<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/fs/sysfs, branch v2.6.28.1</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/fs/sysfs?h=v2.6.28.1</id>
<link rel='self' href='https://git.amat.us/linux/atom/fs/sysfs?h=v2.6.28.1'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-10-23T09:13:21Z</updated>
<entry>
<title>[PATCH] fix -&gt;llseek for more directories</title>
<updated>2008-10-23T09:13:21Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2008-09-03T19:53:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3222a3e55f4025acb2a5a4379cf2f2b7df1f1243'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>kobject: Cleanup kobject_rename and !CONFIG_SYSFS</title>
<updated>2008-10-16T16:24:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2008-07-04T01:05:28Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0b4a4fea253e1296222603ccc55430ed7cd9413a'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sysfs: Make dir and name args to sysfs_notify() const</title>
<updated>2008-10-16T16:24:51Z</updated>
<author>
<name>Trent Piepho</name>
<email>tpiepho@freescale.com</email>
</author>
<published>2008-09-25T23:45:13Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c0e3998f5b71e68fe6b6e489a92e052715e563c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sysfs: use ilookup5() instead of ilookup5_nowait()</title>
<updated>2008-10-16T16:24:51Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2008-09-27T22:48:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45c076c5d71e6e644e2eae64f80922d162c900ac'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sysfs: fix deadlock</title>
<updated>2008-10-16T16:24:50Z</updated>
<author>
<name>Nick Piggin</name>
<email>npiggin@suse.de</email>
</author>
<published>2008-09-12T09:24:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b31ca3f5dfc89c3f1f654b30f0760d0e2fb15e45'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sysfs: Support sysfs_notify from atomic context with new sysfs_notify_dirent</title>
<updated>2008-10-16T16:24:47Z</updated>
<author>
<name>Neil Brown</name>
<email>neilb@suse.de</email>
</author>
<published>2008-07-15T22:58:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1282c844e86db5a041afa41335b5f9eea6cec0c'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>sysfs: crash debugging</title>
<updated>2008-10-16T16:24:41Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2007-08-24T23:11:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ae87221d3ce49d9de1e43756da834fd0bf05a2ad'/>
<id>urn:sha1:ae87221d3ce49d9de1e43756da834fd0bf05a2ad</id>
<content type='text'>
Print the name of the last-accessed sysfs file when we oops, to help track
down oopses which occur in sysfs store/read handlers.  Because these oopses
tend to not leave any trace of the offending code in the stack traces.

Cc: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@polymtl.ca&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Use WARN() in fs/sysfs</title>
<updated>2008-07-26T19:00:07Z</updated>
<author>
<name>Arjan van de Ven</name>
<email>arjan@linux.intel.com</email>
</author>
<published>2008-07-26T02:45:41Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=99fcd77d15357e8ba51005c25cc750b9c28b2688'/>
<id>urn:sha1:99fcd77d15357e8ba51005c25cc750b9c28b2688</id>
<content type='text'>
Use WARN() instead of a printk+WARN_ON() pair; this way the message becomes
part of the warning section for better reporting/collection.  Also, with this,
one fo the if() sections collapses entirely into the WARN().

Signed-off-by: Arjan van de Ven &lt;arjan@linux.intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver core: Suppress sysfs warnings for device_rename().</title>
<updated>2008-07-22T04:55:01Z</updated>
<author>
<name>Cornelia Huck</name>
<email>cornelia.huck@de.ibm.com</email>
</author>
<published>2008-06-10T09:09:08Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=36ce6dad6e3cb3f050ed41e0beac0070d2062b25'/>
<id>urn:sha1:36ce6dad6e3cb3f050ed41e0beac0070d2062b25</id>
<content type='text'>
driver core: Suppress sysfs warnings for device_rename().

Renaming network devices to an already existing name is not
something we want sysfs to print a scary warning for, since the
callers can deal with this correctly. So let's introduce
sysfs_create_link_nowarn() which gets rid of the common warning.

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

</content>
</entry>
<entry>
<title>sysfs: don't call notify_change</title>
<updated>2008-07-22T04:54:57Z</updated>
<author>
<name>Miklos Szeredi</name>
<email>mszeredi@suse.cz</email>
</author>
<published>2008-06-16T11:46:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=93265d13ea5c3ec5f61a8009407fbe046ce6b7c0'/>
<id>urn:sha1:93265d13ea5c3ec5f61a8009407fbe046ce6b7c0</id>
<content type='text'>
sysfs_chmod_file() calls notify_change() to change the permission bits
on a sysfs file.  Replace with explicit call to sysfs_setattr() and
fsnotify_change().

This is equivalent, except that security_inode_setattr() is not
called.  This function is called by drivers, so the security checks do
not make any sense.

Signed-off-by: Miklos Szeredi &lt;mszeredi@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
</feed>
