lkml.org 
[lkml]   [2010]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] sysfs: differentiate between locking links and non-links
On Wed, 10 Feb 2010, Neil Brown wrote:

> commit 2e502cfe444b68f6ef6b8b2abe83b6112564095b
> Author: NeilBrown <neilb@suse.de>
> Date: Wed Feb 10 09:43:45 2010 +1100
>
> sysfs: differentiate between locking links and non-links for sysfs
>
> symlinks and non-symlink is sysfs are very different.
> A symlink can never be locked (active) while an attribute
> modification routine is running. So removing symlink from an
> attribute 'store' routine should be permitted without any lockdep
> warnings.
>
> So split the lockdep context for 's_active' in two, one for symlinks
> and other for everything else.
>

What happens for hard links such as writing to
/sys/devices/block/xxx/queue/scheduler to change an I/O scheduler which
requires sd->dep_map and sd->parent->dep_map in sysfs_get_active_two() to
pin both? The call to kobject_del() invokes the destruction that also
requires sd->dep_map in sysfs_deactivate() because of the s_active lockdep
annotation.

This is the scenario that is presented in
http://bugzilla.kernel.org/show_bug.cgi?id=15202.


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