lkml.org 
[lkml]   [2010]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 44/62] sysfs: Use one lockdep class per sysfs attribute.
On 03/03/2010 08:28 AM, Greg Kroah-Hartman wrote:
> From: Eric W. Biederman <ebiederm@xmission.com>
>
> Acknowledge that the logical sysfs rwsem has one instance per
> sysfs attribute with different locking depencencies for different
> attributes.
>
> There is a sysfs idiom where writing to one sysfs file causes the
> addition or removal of other sysfs files. Lumping all of the
> sysfs attributes together in one lock class causes lockdep to
> generate lots of false positives.
>
> This introduces the requirement that non-static sysfs attributes
> need to be initialized with sysfs_attr_init or sysfs_bin_attr_init.
> Strictly speaking this requirement only exists when lockdep is
> enabled, and when lockdep is enabled we get a bit fat warning
> if this requirement is not met.
>
> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
> Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
> Cc: Tejun Heo <tj@kernel.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Acked-by: Tejun Heo <tj@kernel.org> but it would be nice if when and
how attr->key is set for each case and how it's supposed to trigger
big fat warning in the code. It's a bit difficult to follow
currently.

--
tejun


\
 
 \ /
  Last update: 2010-03-03 02:33    [W:0.371 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site