lkml.org 
[lkml]   [2015]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel/module.c: Free lock-classes if parse_args failed

* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Jan 20, 2015 at 05:07:19PM +1030, Rusty Russell wrote:
> > Andrey Tsyvarev <tsyvarev@ispras.ru> writes:
> > > parse_args call module parameters' .set handlers, which may use locks defined in the module.
> > > So, these classes should be freed in case parse_args returns error(e.g. due to incorrect parameter passed).
> >
> > Thanks, this seems right. Applied.
> >
> > But this makes me ask: where is lockdep_free_key_range() called on the
> > module init code? It doesn't seem to be at all...
>
> Hmm, Ingo, how does this work? The lockless class lookup in
> look_up_lock_class() very much assumes the class hash is only added too,
> but here we go wipe stuff from it.
>
> From what I can tell, every use of lockdep_free_key_range() is broken.

indeed ...

Thanks,

Ingo


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