<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/fs/sysfs, branch v2.6.29</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6</title>
<updated>2009-01-26T18:40:28+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2009-01-26T18:40:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ed803862954528e6fcf7bd0f2b2e5a772a7c3281'/>
<id>ed803862954528e6fcf7bd0f2b2e5a772a7c3281</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  klist.c: bit 0 in pointer can't be used as flag
  debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
  sysfs: fix problems with binary files
  PNP: fix broken pnp lowercasing for acpi module aliases
  driver core: Convert '/' to '!' in dev_set_name()
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  klist.c: bit 0 in pointer can't be used as flag
  debugfs: introduce stub for debugfs_create_size_t() when DEBUG_FS=n
  sysfs: fix problems with binary files
  PNP: fix broken pnp lowercasing for acpi module aliases
  driver core: Convert '/' to '!' in dev_set_name()
</pre>
</div>
</content>
</entry>
<entry>
<title>fs/Kconfig: move sysfs out</title>
<updated>2009-01-22T10:15:56+00:00</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2009-01-22T07:40:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5f3a211a8b02222498f134ea961fe29c97a4801f'/>
<id>5f3a211a8b02222498f134ea961fe29c97a4801f</id>
<content type='text'>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: fix problems with binary files</title>
<updated>2009-01-21T04:52:09+00:00</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@suse.de</email>
</author>
<published>2009-01-20T23:51:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4503efd0891c40e30928afb4b23dc3f99c62a6b2'/>
<id>4503efd0891c40e30928afb4b23dc3f99c62a6b2</id>
<content type='text'>
Some sysfs binary files don't like having 0 passed to them as a size.
Fix this up at the root by just returning to the vfs if userspace asks
us for a zero sized buffer.

Thanks to Pavel Roskin for pointing this out.

Reported-by: Pavel Roskin &lt;proski@gnu.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>
Some sysfs binary files don't like having 0 passed to them as a size.
Fix this up at the root by just returning to the vfs if userspace asks
us for a zero sized buffer.

Thanks to Pavel Roskin for pointing this out.

Reported-by: Pavel Roskin &lt;proski@gnu.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>zero i_uid/i_gid on inode allocation</title>
<updated>2009-01-05T16:54:28+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2008-12-09T14:34:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=56ff5efad96182f4d3cb3dc6b07396762c658f16'/>
<id>56ff5efad96182f4d3cb3dc6b07396762c658f16</id>
<content type='text'>
... and don't bother in callers.  Don't bother with zeroing i_blocks,
while we are at it - it's already been zeroed.

i_mode is not worth the effort; it has no common default value.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
... and don't bother in callers.  Don't bother with zeroing i_blocks,
while we are at it - it's already been zeroed.

i_mode is not worth the effort; it has no common default value.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] fix -&gt;llseek for more directories</title>
<updated>2008-10-23T09:13:21+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2008-09-03T19:53:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3222a3e55f4025acb2a5a4379cf2f2b7df1f1243'/>
<id>3222a3e55f4025acb2a5a4379cf2f2b7df1f1243</id>
<content type='text'>
With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With this patch all directory fops instances that have a readdir
that doesn't take the BKL are switched to generic_file_llseek.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>kobject: Cleanup kobject_rename and !CONFIG_SYSFS</title>
<updated>2008-10-16T16:24:52+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-07-04T01:05:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0b4a4fea253e1296222603ccc55430ed7cd9413a'/>
<id>0b4a4fea253e1296222603ccc55430ed7cd9413a</id>
<content type='text'>
It finally dawned on me what the clean fix to sysfs_rename_dir
calling kobject_set_name is.  Move the work into kobject_rename
where it belongs.  The callers serialize us anyway so this is
safe.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.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>
It finally dawned on me what the clean fix to sysfs_rename_dir
calling kobject_set_name is.  Move the work into kobject_rename
where it belongs.  The callers serialize us anyway so this is
safe.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: Make dir and name args to sysfs_notify() const</title>
<updated>2008-10-16T16:24:51+00:00</updated>
<author>
<name>Trent Piepho</name>
<email>tpiepho@freescale.com</email>
</author>
<published>2008-09-25T23:45:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8c0e3998f5b71e68fe6b6e489a92e052715e563c'/>
<id>8c0e3998f5b71e68fe6b6e489a92e052715e563c</id>
<content type='text'>
Because they can be, and because code like this produces a warning if
they're not:

struct device_attribute dev_attr;

sysfs_notify(&amp;kobj, NULL, dev_attr.attr.name);

Signed-off-by: Trent Piepho &lt;tpiepho@freescale.com&gt;
CC: Neil Brown &lt;neilb@suse.de&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>
Because they can be, and because code like this produces a warning if
they're not:

struct device_attribute dev_attr;

sysfs_notify(&amp;kobj, NULL, dev_attr.attr.name);

Signed-off-by: Trent Piepho &lt;tpiepho@freescale.com&gt;
CC: Neil Brown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>sysfs: use ilookup5() instead of ilookup5_nowait()</title>
<updated>2008-10-16T16:24:51+00:00</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-09-27T22:48:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=45c076c5d71e6e644e2eae64f80922d162c900ac'/>
<id>45c076c5d71e6e644e2eae64f80922d162c900ac</id>
<content type='text'>
As inode creation is protected by sysfs_mutex, ilookup5_nowait()
always either fails to find at all or finds one which is fully
initialized, so using ilookup5_nowait() or ilookup5() doesn't make any
difference.  Switch to ilookup5() as it's planned to be removed.  This
change also makes lookup return value handling a bit simpler.

This change was suggested by Al Viro.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Al Viro &lt;viro@hera.kernel.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>
As inode creation is protected by sysfs_mutex, ilookup5_nowait()
always either fails to find at all or finds one which is fully
initialized, so using ilookup5_nowait() or ilookup5() doesn't make any
difference.  Switch to ilookup5() as it's planned to be removed.  This
change also makes lookup return value handling a bit simpler.

This change was suggested by Al Viro.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Al Viro &lt;viro@hera.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</pre>
</div>
</content>
</entry>
<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.toradex.cn/cgit/linux-toradex.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: Support sysfs_notify from atomic context with new sysfs_notify_dirent</title>
<updated>2008-10-16T16:24:47+00:00</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-07-15T22:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f1282c844e86db5a041afa41335b5f9eea6cec0c'/>
<id>f1282c844e86db5a041afa41335b5f9eea6cec0c</id>
<content type='text'>
Support sysfs_notify from atomic context with new sysfs_notify_dirent

sysfs_notify currently takes sysfs_mutex.
This means that it cannot be called in atomic context.
sysfs_mutex  is sometimes held over a malloc (sysfs_rename_dir)
so it can block on low memory.

In md I want to be able to notify on a sysfs attribute from
atomic context, and I don't want to block on low memory because I
could be in the writeout path for freeing memory.

So:
 - export the "sysfs_dirent" structure along with sysfs_get, sysfs_put
   and sysfs_get_dirent so I can get the sysfs_dirent that I want to
   notify on and hold it in an md structure.
 - split sysfs_notify_dirent out of sysfs_notify so the sysfs_dirent
   can be notified on with no blocking (just a spinlock).

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.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>
Support sysfs_notify from atomic context with new sysfs_notify_dirent

sysfs_notify currently takes sysfs_mutex.
This means that it cannot be called in atomic context.
sysfs_mutex  is sometimes held over a malloc (sysfs_rename_dir)
so it can block on low memory.

In md I want to be able to notify on a sysfs attribute from
atomic context, and I don't want to block on low memory because I
could be in the writeout path for freeing memory.

So:
 - export the "sysfs_dirent" structure along with sysfs_get, sysfs_put
   and sysfs_get_dirent so I can get the sysfs_dirent that I want to
   notify on and hold it in an md structure.
 - split sysfs_notify_dirent out of sysfs_notify so the sysfs_dirent
   can be notified on with no blocking (just a spinlock).

Signed-off-by: Neil Brown &lt;neilb@suse.de&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

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