lkml.org 
[lkml]   [2014]   [Jan]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/5] lockdep: (Was: check && lockdep_no_validate)
On Mon, 20 Jan 2014, Oleg Nesterov wrote:

> > > At first glance, can't __ATTR_IGNORE_LOCKDEP() use no_validate too ?
> > > (ignoring the fact checkpatch.pl won't be happy). This can simplify
> > > the code, it seems.
> >
> > Well, the macro itself doesn't specify the lockdep class. That happens
> > implicitly in sysfs_get_active(), in the call to rwsem_acquire_read().
> > However, it ought to be possible to change the code so that when
> > ignore_lockdep(sd) returns nonzero, we end up using no_validate.
>
> sysfs_dirent_init_lockdep() can check ->ignore_lockdep and do
> lockdep_set_novalidate_class(). This way sysfs_ignore_lockdep() can
> go away.
>
> I guess we could even change __ATTR_IGNORE_LOCKDEP() to initialize
> ->key = __lockdep_no_validate__ and kill ->ignore_lockdep.

It's clear that you have a more thorough understanding of how sysfs and
lockdep work than I do. :-)

This suggestion sounds quite reasonable.

Alan Stern



\
 
 \ /
  Last update: 2014-01-20 23:21    [W:0.063 / U:3.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site