lkml.org 
[lkml]   [2015]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fix a race between /proc/lock_stat and module unloading
On Fri, May 29, 2015 at 02:47:15PM +0200, Jerome Marchand wrote:
> When opening /proc/lock_stat, lock_stat_open() makes a copy of
> all_lock_classes list in the form of an array of ad hoc structures
> lock_stat_data that reference lock_class, so it can be sorted and
> passed to seq_read(). However, nothing prevents module unloading code
> to free some of these lock_class structures before seq_read() tries to
> access them.

Well, how about lock_class being from a static array in lockdep.c:138 ?




\
 
 \ /
  Last update: 2015-06-02 12:01    [W:0.096 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site