<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/sysfs/bin.c, branch v2.6.28</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>sysfs: fix deadlock</title>
<updated>2008-10-16T16:24:50+00:00</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-09-12T09:24:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b31ca3f5dfc89c3f1f654b30f0760d0e2fb15e45'/>
<id>b31ca3f5dfc89c3f1f654b30f0760d0e2fb15e45</id>
<content type='text'>
On Thu, Sep 11, 2008 at 10:27:10AM +0200, Ingo Molnar wrote:

&gt; and it's working fine on most boxes. One testbox found this new locking
&gt; scenario:
&gt;
&gt; PM: Adding info for No Bus:vcsa7
&gt; EDAC DEBUG: MC0: i82860_check()
&gt;
&gt; =======================================================
&gt; [ INFO: possible circular locking dependency detected ]
&gt; 2.6.27-rc6-tip #1
&gt; -------------------------------------------------------
&gt; X/4873 is trying to acquire lock:
&gt;  (&amp;bb-&gt;mutex){--..}, at: [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;
&gt; but task is already holding lock:
&gt;  (&amp;mm-&gt;mmap_sem){----}, at: [&lt;c0125a1e&gt;] sys_mmap2+0x8e/0xc0
&gt;
&gt; which lock already depends on the new lock.
&gt;
&gt;
&gt; the existing dependency chain (in reverse order) is:
&gt;
&gt; -&gt; #1 (&amp;mm-&gt;mmap_sem){----}:
&gt;        [&lt;c017dc96&gt;] validate_chain+0xa96/0xf50
&gt;        [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;        [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;        [&lt;c01aa8fb&gt;] might_fault+0x6b/0x90
&gt;        [&lt;c040b618&gt;] copy_to_user+0x38/0x60
&gt;        [&lt;c020bcfb&gt;] read+0xfb/0x170
&gt;        [&lt;c01c09a5&gt;] vfs_read+0x95/0x110
&gt;        [&lt;c01c1443&gt;] sys_pread64+0x63/0x80
&gt;        [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;        [&lt;ffffffff&gt;] 0xffffffff
&gt;
&gt; -&gt; #0 (&amp;bb-&gt;mutex){--..}:
&gt;        [&lt;c017d8b7&gt;] validate_chain+0x6b7/0xf50
&gt;        [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;        [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;        [&lt;c0d6f2ab&gt;] __mutex_lock_common+0xab/0x3c0
&gt;        [&lt;c0d6f698&gt;] mutex_lock_nested+0x38/0x50
&gt;        [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;        [&lt;c01b111e&gt;] mmap_region+0x14e/0x450
&gt;        [&lt;c01b170f&gt;] do_mmap_pgoff+0x2ef/0x310
&gt;        [&lt;c0125a3d&gt;] sys_mmap2+0xad/0xc0
&gt;        [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;        [&lt;ffffffff&gt;] 0xffffffff
&gt;
&gt; other info that might help us debug this:
&gt;
&gt; 1 lock held by X/4873:
&gt;  #0:  (&amp;mm-&gt;mmap_sem){----}, at: [&lt;c0125a1e&gt;] sys_mmap2+0x8e/0xc0
&gt;
&gt; stack backtrace:
&gt; Pid: 4873, comm: X Not tainted 2.6.27-rc6-tip #1
&gt;  [&lt;c017cd09&gt;] print_circular_bug_tail+0x79/0xc0
&gt;  [&lt;c017d8b7&gt;] validate_chain+0x6b7/0xf50
&gt;  [&lt;c017a5b5&gt;] ? trace_hardirqs_off_caller+0x15/0xb0
&gt;  [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;  [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c0d6f2ab&gt;] __mutex_lock_common+0xab/0x3c0
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c0d6f698&gt;] mutex_lock_nested+0x38/0x50
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;  [&lt;c01b111e&gt;] mmap_region+0x14e/0x450
&gt;  [&lt;c01afb88&gt;] ? arch_get_unmapped_area_topdown+0xf8/0x160
&gt;  [&lt;c01b170f&gt;] do_mmap_pgoff+0x2ef/0x310
&gt;  [&lt;c0125a3d&gt;] sys_mmap2+0xad/0xc0
&gt;  [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;  [&lt;c0120000&gt;] ? __switch_to+0x130/0x220
&gt;  =======================
&gt; evbug.c: Event. Dev: input3, Type: 20, Code: 0, Value: 500
&gt; warning: `sudo' uses deprecated v2 capabilities in a way that may be insecure.
&gt;
&gt; i've attached the config.
&gt;
&gt; at first sight it looks like a genuine bug in fs/sysfs/bin.c?

Yes, it is a real bug by the looks. bin.c takes bb-&gt;mutex under mmap_sem
when it is mmapped, and then does its copy_*_user under bb-&gt;mutex too.

Here is a basic fix for the sysfs lor.


From: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Thu, Sep 11, 2008 at 10:27:10AM +0200, Ingo Molnar wrote:

&gt; and it's working fine on most boxes. One testbox found this new locking
&gt; scenario:
&gt;
&gt; PM: Adding info for No Bus:vcsa7
&gt; EDAC DEBUG: MC0: i82860_check()
&gt;
&gt; =======================================================
&gt; [ INFO: possible circular locking dependency detected ]
&gt; 2.6.27-rc6-tip #1
&gt; -------------------------------------------------------
&gt; X/4873 is trying to acquire lock:
&gt;  (&amp;bb-&gt;mutex){--..}, at: [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;
&gt; but task is already holding lock:
&gt;  (&amp;mm-&gt;mmap_sem){----}, at: [&lt;c0125a1e&gt;] sys_mmap2+0x8e/0xc0
&gt;
&gt; which lock already depends on the new lock.
&gt;
&gt;
&gt; the existing dependency chain (in reverse order) is:
&gt;
&gt; -&gt; #1 (&amp;mm-&gt;mmap_sem){----}:
&gt;        [&lt;c017dc96&gt;] validate_chain+0xa96/0xf50
&gt;        [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;        [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;        [&lt;c01aa8fb&gt;] might_fault+0x6b/0x90
&gt;        [&lt;c040b618&gt;] copy_to_user+0x38/0x60
&gt;        [&lt;c020bcfb&gt;] read+0xfb/0x170
&gt;        [&lt;c01c09a5&gt;] vfs_read+0x95/0x110
&gt;        [&lt;c01c1443&gt;] sys_pread64+0x63/0x80
&gt;        [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;        [&lt;ffffffff&gt;] 0xffffffff
&gt;
&gt; -&gt; #0 (&amp;bb-&gt;mutex){--..}:
&gt;        [&lt;c017d8b7&gt;] validate_chain+0x6b7/0xf50
&gt;        [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;        [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;        [&lt;c0d6f2ab&gt;] __mutex_lock_common+0xab/0x3c0
&gt;        [&lt;c0d6f698&gt;] mutex_lock_nested+0x38/0x50
&gt;        [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;        [&lt;c01b111e&gt;] mmap_region+0x14e/0x450
&gt;        [&lt;c01b170f&gt;] do_mmap_pgoff+0x2ef/0x310
&gt;        [&lt;c0125a3d&gt;] sys_mmap2+0xad/0xc0
&gt;        [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;        [&lt;ffffffff&gt;] 0xffffffff
&gt;
&gt; other info that might help us debug this:
&gt;
&gt; 1 lock held by X/4873:
&gt;  #0:  (&amp;mm-&gt;mmap_sem){----}, at: [&lt;c0125a1e&gt;] sys_mmap2+0x8e/0xc0
&gt;
&gt; stack backtrace:
&gt; Pid: 4873, comm: X Not tainted 2.6.27-rc6-tip #1
&gt;  [&lt;c017cd09&gt;] print_circular_bug_tail+0x79/0xc0
&gt;  [&lt;c017d8b7&gt;] validate_chain+0x6b7/0xf50
&gt;  [&lt;c017a5b5&gt;] ? trace_hardirqs_off_caller+0x15/0xb0
&gt;  [&lt;c017ef2b&gt;] __lock_acquire+0x2cb/0x5b0
&gt;  [&lt;c017f299&gt;] lock_acquire+0x89/0xc0
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c0d6f2ab&gt;] __mutex_lock_common+0xab/0x3c0
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c0d6f698&gt;] mutex_lock_nested+0x38/0x50
&gt;  [&lt;c020ba20&gt;] ? mmap+0x40/0xa0
&gt;  [&lt;c020ba20&gt;] mmap+0x40/0xa0
&gt;  [&lt;c01b111e&gt;] mmap_region+0x14e/0x450
&gt;  [&lt;c01afb88&gt;] ? arch_get_unmapped_area_topdown+0xf8/0x160
&gt;  [&lt;c01b170f&gt;] do_mmap_pgoff+0x2ef/0x310
&gt;  [&lt;c0125a3d&gt;] sys_mmap2+0xad/0xc0
&gt;  [&lt;c012146f&gt;] sysenter_do_call+0x12/0x43
&gt;  [&lt;c0120000&gt;] ? __switch_to+0x130/0x220
&gt;  =======================
&gt; evbug.c: Event. Dev: input3, Type: 20, Code: 0, Value: 500
&gt; warning: `sudo' uses deprecated v2 capabilities in a way that may be insecure.
&gt;
&gt; i've attached the config.
&gt;
&gt; at first sight it looks like a genuine bug in fs/sysfs/bin.c?

Yes, it is a real bug by the looks. bin.c takes bb-&gt;mutex under mmap_sem
when it is mmapped, and then does its copy_*_user under bb-&gt;mutex too.

Here is a basic fix for the sysfs lor.


From: Nick Piggin &lt;npiggin@suse.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: add copyrights</title>
<updated>2007-10-12T21:51:12+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-09-20T08:31:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6d66f5cd26e4c482e986130b7572f2735a0f7e8b'/>
<id>6d66f5cd26e4c482e986130b7572f2735a0f7e8b</id>
<content type='text'>
Sysfs has gone through considerable amount of reimplementation.  Add
copyrights.  Any objections?  :-)

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sysfs has gone through considerable amount of reimplementation.  Add
copyrights.  Any objections?  :-)

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: make s_elem an anonymous union</title>
<updated>2007-10-12T21:51:10+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-09-20T07:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b1fc3d6144d56360d1373b01c7881826f558b6cd'/>
<id>b1fc3d6144d56360d1373b01c7881826f558b6cd</id>
<content type='text'>
Make s_elem an anonymous union.  Prefixing with s_elem makes things
needlessly longer without any advantage.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make s_elem an anonymous union.  Prefixing with s_elem makes things
needlessly longer without any advantage.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: make bin attr open get active reference of parent too</title>
<updated>2007-10-12T21:51:10+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-09-20T07:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=078ce6409ca54d5fc6eb7d2147cd6efc3eb09078'/>
<id>078ce6409ca54d5fc6eb7d2147cd6efc3eb09078</id>
<content type='text'>
All bin attr operations require active references of itself and its
parent.  There's no reason to allow open when its parent has been
deactivated and allowing it is inconsistent with regular sysfs file.
Use sysfs_get_active_two() in bin attribute open function.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
All bin attr operations require active references of itself and its
parent.  There's no reason to allow open when its parent has been
deactivated and allowing it is inconsistent with regular sysfs file.
Use sysfs_get_active_two() in bin attribute open function.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: kill unnecessary sysfs_get() in open paths</title>
<updated>2007-10-12T21:51:10+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-09-20T07:05:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=b05f0548dabd20433f8c201a0307103721d6a18b'/>
<id>b05f0548dabd20433f8c201a0307103721d6a18b</id>
<content type='text'>
There's no reason to get an extra reference to sysfs_dirent for an
open file.  Open file has a reference to the dentry which in turn has
a reference to sysfs_dirent.  This is fairly obvious as otherwise open
itself won't be able to access the sysfs_dirent.  Kill the extra
sysfs_get() and matching sysfs_put().

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no reason to get an extra reference to sysfs_dirent for an
open file.  Open file has a reference to the dentry which in turn has
a reference to sysfs_dirent.  This is fairly obvious as otherwise open
itself won't be able to access the sysfs_dirent.  Kill the extra
sysfs_get() and matching sysfs_put().

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: cleanup semaphore.h</title>
<updated>2007-10-12T21:51:03+00:00</updated>
<author>
<name>Dave Young</name>
<email>hidave.darkstar@gmail.com</email>
</author>
<published>2007-07-26T14:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=869512ab5ab93e5e82ad7d4aaf4ed098d23bfc3f'/>
<id>869512ab5ab93e5e82ad7d4aaf4ed098d23bfc3f</id>
<content type='text'>
Cleanup semaphore.h

Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Cleanup semaphore.h

Signed-off-by: Dave Young &lt;hidave.darkstar@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: don't warn on removal of a nonexistent binary file</title>
<updated>2007-08-22T21:35:36+00:00</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2007-08-16T20:13:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5f1835da79df8607ecbd69f648b5b140b7a0b8ba'/>
<id>5f1835da79df8607ecbd69f648b5b140b7a0b8ba</id>
<content type='text'>
This patch (as960) removes the error message and stack dump logged by
sysfs_remove_bin_file() when someone tries to remove a nonexistent
file.  The warning doesn't seem to be needed, since none of the other
file-, symlink-, or directory-removal routines in sysfs complain in a
comparable way.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch (as960) removes the error message and stack dump logged by
sysfs_remove_bin_file() when someone tries to remove a nonexistent
file.  The warning doesn't seem to be needed, since none of the other
file-, symlink-, or directory-removal routines in sysfs complain in a
comparable way.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Acked-by: Tejun Heo &lt;htejun@gmail.com&gt;
Acked-by: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: add parameter "struct bin_attribute *" in .read/.write methods for sysfs binary attributes</title>
<updated>2007-07-11T23:09:09+00:00</updated>
<author>
<name>Zhang Rui</name>
<email>rui.zhang@intel.com</email>
</author>
<published>2007-06-09T05:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=91a6902958f052358899f58683d44e36228d85c2'/>
<id>91a6902958f052358899f58683d44e36228d85c2</id>
<content type='text'>
Well, first of all, I don't want to change so many files either.

What I do:
Adding a new parameter "struct bin_attribute *" in the
.read/.write methods for the sysfs binary attributes.

In fact, only the four lines change in fs/sysfs/bin.c and
include/linux/sysfs.h do the real work.
But I have to update all the files that use binary attributes
to make them compatible with the new .read and .write methods.
I'm not sure if I missed any. :(

Why I do this:
For a sysfs attribute, we can get a pointer pointing to the
struct attribute in the .show/.store method,
while we can't do this for the binary attributes.
I don't know why this is different, but this does make it not
so handy to use the binary attributes as the regular ones.
So I think this patch is reasonable. :)

Who benefits from it:
The patch that exposes ACPI tables in sysfs
requires such an improvement.
All the table binary attributes share the same .read method.
Parameter "struct bin_attribute *" is used to get
the table signature and instance number which are used to
distinguish different ACPI table binary attributes.

Without this parameter, we need to offer different .read methods
for different ACPI table binary attributes.
This is impossible as there are various ACPI tables on different
platforms, and we don't know what they are until they are loaded.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Well, first of all, I don't want to change so many files either.

What I do:
Adding a new parameter "struct bin_attribute *" in the
.read/.write methods for the sysfs binary attributes.

In fact, only the four lines change in fs/sysfs/bin.c and
include/linux/sysfs.h do the real work.
But I have to update all the files that use binary attributes
to make them compatible with the new .read and .write methods.
I'm not sure if I missed any. :(

Why I do this:
For a sysfs attribute, we can get a pointer pointing to the
struct attribute in the .show/.store method,
while we can't do this for the binary attributes.
I don't know why this is different, but this does make it not
so handy to use the binary attributes as the regular ones.
So I think this patch is reasonable. :)

Who benefits from it:
The patch that exposes ACPI tables in sysfs
requires such an improvement.
All the table binary attributes share the same .read method.
Parameter "struct bin_attribute *" is used to get
the table signature and instance number which are used to
distinguish different ACPI table binary attributes.

Without this parameter, we need to offer different .read methods
for different ACPI table binary attributes.
This is impossible as there are various ACPI tables on different
platforms, and we don't know what they are until they are loaded.

Signed-off-by: Zhang Rui &lt;rui.zhang@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: make kobj point to sysfs_dirent instead of dentry</title>
<updated>2007-07-11T23:09:08+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-06-13T19:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=608e266a2d4e62c1b98c1c573064b6afe8c06a58'/>
<id>608e266a2d4e62c1b98c1c573064b6afe8c06a58</id>
<content type='text'>
As kobj sysfs dentries and inodes are gonna be made reclaimable,
dentry can't be used as naming token for sysfs file/directory, replace
kobj-&gt;dentry with kobj-&gt;sd.  The only external interface change is
shadow directory handling.  All other changes are contained in kobj
and sysfs.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As kobj sysfs dentries and inodes are gonna be made reclaimable,
dentry can't be used as naming token for sysfs file/directory, replace
kobj-&gt;dentry with kobj-&gt;sd.  The only external interface change is
shadow directory handling.  All other changes are contained in kobj
and sysfs.

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: kill unnecessary attribute-&gt;owner</title>
<updated>2007-07-11T23:09:06+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>htejun@gmail.com</email>
</author>
<published>2007-06-13T18:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7b595756ec1f49e0049a9e01a1298d53a7faaa15'/>
<id>7b595756ec1f49e0049a9e01a1298d53a7faaa15</id>
<content type='text'>
sysfs is now completely out of driver/module lifetime game.  After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners.  Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.

This patch kills now unnecessary attribute-&gt;owner.  Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.

For more info regarding lifetime rule cleanup, please read the
following message.

  http://article.gmane.org/gmane.linux.kernel/510293

(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
sysfs is now completely out of driver/module lifetime game.  After
deletion, a sysfs node doesn't access anything outside sysfs proper,
so there's no reason to hold onto the attribute owners.  Note that
often the wrong modules were accounted for as owners leading to
accessing removed modules.

This patch kills now unnecessary attribute-&gt;owner.  Note that with
this change, userland holding a sysfs node does not prevent the
backing module from being unloaded.

For more info regarding lifetime rule cleanup, please read the
following message.

  http://article.gmane.org/gmane.linux.kernel/510293

(tweaked by Greg to not delete the field just yet, to make it easier to
merge things properly.)

Signed-off-by: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: Cornelia Huck &lt;cornelia.huck@de.ibm.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
</feed>
