Messages in this thread | | | Date | Tue, 2 Jun 2015 11:30:43 +0200 | From | Peter Zijlstra <> | Subject | Re: [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 ?
| |