<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/sysfs.h, branch v2.6.34</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v2.6.34'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2010-03-08T01:04:52+00:00</updated>
<entry>
<title>sysfs: fix for thinko with sysfs_bin_attr_init()</title>
<updated>2010-03-08T01:04:52+00:00</updated>
<author>
<name>Stephen Rothwell</name>
<email>sfr@canb.auug.org.au</email>
</author>
<published>2010-03-01T09:38:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=62e877b893e6350c900d381f353aa62ed48dcc97'/>
<id>urn:sha1:62e877b893e6350c900d381f353aa62ed48dcc97</id>
<content type='text'>
After merging the final tree, today's linux-next build (powerpc
allyesconfig) failed like this:

drivers/pci/pci-sysfs.c: In function 'pci_create_legacy_files':
drivers/pci/pci-sysfs.c:645: error: lvalue required as unary '&amp;' operand
drivers/pci/pci-sysfs.c:658: error: lvalue required as unary '&amp;' operand

Caused by commit "sysfs: Use sysfs_attr_init and sysfs_bin_attr_init on
dynamic attributes" interacting with commit "sysfs: Use one lockdep
class per sysfs attribute") both from the driver-core tree.

Signed-off-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>sysfs: Implement sysfs_rename_link</title>
<updated>2010-03-08T01:04:52+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-02-13T03:22:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7cb32942d91a501b2df944928ccc9e6590ab237b'/>
<id>urn:sha1:7cb32942d91a501b2df944928ccc9e6590ab237b</id>
<content type='text'>
Because of rename ordering problems we occassionally give false
warnings about invalid sysfs operations.  So using sysfs_rename
create a sysfs_rename_link function that doesn't need strange
workarounds.

Cc: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Cc: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@aristanetworks.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: Document sysfs_attr_init and sysfs_bin_attr_init</title>
<updated>2010-03-08T01:04:51+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-02-12T12:35:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35960258ed388cdcebdb71df35fd5126978ca325'/>
<id>urn:sha1:35960258ed388cdcebdb71df35fd5126978ca325</id>
<content type='text'>
I have added a new requirement to the external sysfs interface
that dynamically allocated sysfs attributes must call sysfs_attr_init
if lockdep is enabled.  For the time being callying sysfs_attr_init
is only mandatory if lockdep is enabled, so we can live with a few
unconverted instances until we find them all.  As this is part of
the public interface of sysfs it is a good idea to document these
pseudo functions so someone inspeciting the code can find out
what has happened.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: Use one lockdep class per sysfs attribute.</title>
<updated>2010-03-08T01:04:51+00:00</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-02-11T23:21:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6992f5334995af474c2b58d010d08bc597f0f2fe'/>
<id>urn:sha1:6992f5334995af474c2b58d010d08bc597f0f2fe</id>
<content type='text'>
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 &lt;ebiederm@xmission.com&gt;
Acked-by: WANG Cong &lt;xiyou.wangcong@gmail.com&gt;
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: Add sysfs_add/remove_files utility functions</title>
<updated>2010-03-08T01:04:47+00:00</updated>
<author>
<name>Andi Kleen</name>
<email>andi@firstfloor.org</email>
</author>
<published>2010-01-05T11:48:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c205ae18db53ff72985dd79f3baaf2dbaba6db7'/>
<id>urn:sha1:1c205ae18db53ff72985dd79f3baaf2dbaba6db7</id>
<content type='text'>
Adding/Removing a whole array of attributes is very common. Add a standard
utility function to do this with a simple function call, instead of
requiring drivers to open code this.

Signed-off-by: Andi Kleen &lt;ak@linux.intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;


</content>
</entry>
<entry>
<title>Driver core: bin_attribute parameters can often be const*</title>
<updated>2009-12-23T19:23:43+00:00</updated>
<author>
<name>Phil Carmody</name>
<email>ext-phil.2.carmody@nokia.com</email>
</author>
<published>2009-12-18T13:34:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=66ecb92be9eb579df93add22d19843e7869f168e'/>
<id>urn:sha1:66ecb92be9eb579df93add22d19843e7869f168e</id>
<content type='text'>
Many struct bin_attribute descriptors are purely read-only
structures, and there's no need to change them. Therefore
make the promise not to, which will let those descriptors
be put in a ro section.

Signed-off-by: Phil Carmody &lt;ext-phil.2.carmody@nokia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>x86: sysfs: kill owner field from attribute</title>
<updated>2008-10-20T15:52:42+00:00</updated>
<author>
<name>Parag Warudkar</name>
<email>parag.lkml@gmail.com</email>
</author>
<published>2008-10-19T03:28:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01e8ef11bc1a74e65678ed55795f59266d4add01'/>
<id>urn:sha1:01e8ef11bc1a74e65678ed55795f59266d4add01</id>
<content type='text'>
Tejun's commit 7b595756ec1f49e0049a9e01a1298d53a7faaa15 made sysfs
attribute-&gt;owner unnecessary.  But the field was left in the structure to
ease the merge.  It's been over a year since that change and it is now
time to start killing attribute-&gt;owner along with its users - one arch at
a time!

This patch is attempt #1 to get rid of attribute-&gt;owner only for
CONFIG_X86_64 or CONFIG_X86_32 .  We will deal with other arches later on
as and when possible - avr32 will be the next since that is something I
can test.  Compile (make allyesconfig / make allmodconfig / custom config)
and boot tested.

akpm: the idea is that we put the declaration of sttribute.owner inside
`#ifndef CONFIG_X86'.  But that proved to be too ambitious for now because
new usages kept on turning up in subsystem trees.

[akpm: remove the ifdef for now]
Signed-off-by: Parag Warudkar &lt;parag.lkml@gmail.com&gt;
Cc: Greg KH &lt;greg@kroah.com&gt;
Cc: Ingo Molnar &lt;mingo@elte.hu&gt;
Cc: Tejun Heo &lt;htejun@gmail.com&gt;
Cc: Len Brown &lt;lenb@kernel.org&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Jean Delvare &lt;khali@linux-fr.org&gt;
Cc: Roland Dreier &lt;rolandd@cisco.com&gt;
Cc: David Brownell &lt;david-b@pacbell.net&gt;
Cc: Alessandro Zummo &lt;a.zummo@towertech.it&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>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.radix-linux.su/kernel/linux.git/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>kobject: Fix 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-05-08T21:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=030c1d2bfcc2187650fb975456ca0b61a5bb77f4'/>
<id>urn:sha1:030c1d2bfcc2187650fb975456ca0b61a5bb77f4</id>
<content type='text'>
When looking at kobject_rename I found two bugs with
that exist when sysfs support is disabled in the kernel.

kobject_rename does not change the name on the kobject when
sysfs support is not compiled in.

kobject_rename without locking attempts to check the
validity of a rename operation, which the kobject layer
simply does not have the infrastructure to do.

This patch documents the previously unstated requirement of
kobject_rename that is the responsibility of the caller to
provide mutual exclusion and to be certain that the new_name
for the kobject is valid.

This patch modifies sysfs_rename_dir in !CONFIG_SYSFS case
to call kobject_set_name to actually change the kobject_name.

This patch removes the bogus and misleading check in kobject_rename
that attempts to see if a rename is valid.  The check is bogus
because we do not have the proper locking.  The check is misleading
because it looks like we can and do perform checking at the kobject
level that we don't.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&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: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.radix-linux.su/kernel/linux.git/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>
</feed>
