<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/kobject.c, branch v3.7-rc7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/lib/kobject.c?h=v3.7-rc7</id>
<link rel='self' href='https://git.amat.us/linux/atom/lib/kobject.c?h=v3.7-rc7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-05-07T23:51:19Z</updated>
<entry>
<title>kobject: fix the uncorrect comment</title>
<updated>2012-05-07T23:51:19Z</updated>
<author>
<name>Zhi Yong Wu</name>
<email>wuzhy@linux.vnet.ibm.com</email>
</author>
<published>2012-05-07T02:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9ff1f838e9c019b16b720dca9b04565f1a6e0316'/>
<id>urn:sha1:9ff1f838e9c019b16b720dca9b04565f1a6e0316</id>
<content type='text'>
Signed-off-by: Zhi Yong Wu &lt;wuzhy@linux.vnet.ibm.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge 3.4-rc5 into driver-core-next</title>
<updated>2012-05-02T21:33:37Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2012-05-02T21:33:37Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb1574270a6de8fb8d31ffc3b021e30df0afcda3'/>
<id>urn:sha1:eb1574270a6de8fb8d31ffc3b021e30df0afcda3</id>
<content type='text'>
This was done to resolve a merge issue with the init/main.c file.

Reported-by: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/kobject.c : Remove redundant check in create_dir</title>
<updated>2012-04-23T20:34:29Z</updated>
<author>
<name>yan</name>
<email>clouds.yan@gmail.com</email>
</author>
<published>2012-04-20T13:25:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6b9606106ba58d2bd80610f97e06fea58206b47c'/>
<id>urn:sha1:6b9606106ba58d2bd80610f97e06fea58206b47c</id>
<content type='text'>
create_dir is a static function used only in kobject_add_internal.
There's no need to do check here, for kobject_add_internal will
reject kobject with invalid name.

Signed-off-by: Yan Hong &lt;clouds.yan@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kobject: provide more diagnostic info for kobject_add_internal() failures</title>
<updated>2012-04-10T21:48:51Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2012-04-06T20:41:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=282029c005e65ffdce3aa9f8220f88a8bbbc4dae'/>
<id>urn:sha1:282029c005e65ffdce3aa9f8220f88a8bbbc4dae</id>
<content type='text'>
1/ convert open-coded KERN_ERR+dump_stack() to WARN(), so that automated
   tools pick up this warning.

2/ include the 'child' and 'parent' kobject names.  This information was
   useful for tracking down the case where scsi invoked device_del() on a
   parent object and subsequently invoked device_add() on a child.  Now the
   warning looks like:

     kobject_add_internal failed for target8:0:16 (error: -2 parent: end_device-8:0:24)
     Pid: 2942, comm: scsi_scan_8 Not tainted 3.3.0-rc7-isci+ #2
     Call Trace:
      [&lt;ffffffff8125e551&gt;] kobject_add_internal+0x1c1/0x1f3
      [&lt;ffffffff81075149&gt;] ? trace_hardirqs_on+0xd/0xf
      [&lt;ffffffff8125e659&gt;] kobject_add_varg+0x41/0x50
      [&lt;ffffffff8125e723&gt;] kobject_add+0x64/0x66
      [&lt;ffffffff8131124b&gt;] device_add+0x12d/0x63a
      [&lt;ffffffff8125e0ef&gt;] ? kobject_put+0x4c/0x50
      [&lt;ffffffff8132f370&gt;] scsi_sysfs_add_sdev+0x4e/0x28a
      [&lt;ffffffff8132dce3&gt;] do_scan_async+0x9c/0x145

Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: James Bottomley &lt;JBottomley@parallels.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib: reduce the use of module.h wherever possible</title>
<updated>2012-03-07T20:04:04Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-11-17T02:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bc3bcc93a2b4e47d5d410146f6546bca6171663'/>
<id>urn:sha1:8bc3bcc93a2b4e47d5d410146f6546bca6171663</id>
<content type='text'>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>kobject: remove kset_find_obj_hinted()</title>
<updated>2011-12-21T23:13:54Z</updated>
<author>
<name>Kay Sievers</name>
<email>kay.sievers@vrfy.org</email>
</author>
<published>2011-12-21T23:13:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=b3e8d7b2478401b2f25f4566a90faad54f7d6d07'/>
<id>urn:sha1:b3e8d7b2478401b2f25f4566a90faad54f7d6d07</id>
<content type='text'>
Now that there are no in-kernel users of this function, remove it as it
is no longer needed.

Signed-off-by: Kay Sievers &lt;kay.sievers@vrfy.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;
</content>
</entry>
<entry>
<title>Delay struct net freeing while there's a sysfs instance refering to it</title>
<updated>2011-06-12T21:45:41Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-06-09T01:13:01Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a685e08987d1edf1995b76511d4c98ea0e905377'/>
<id>urn:sha1:a685e08987d1edf1995b76511d4c98ea0e905377</id>
<content type='text'>
	* new refcount in struct net, controlling actual freeing of the memory
	* new method in kobj_ns_type_operations (-&gt;drop_ns())
	* -&gt;current_ns() semantics change - it's supposed to be followed by
corresponding -&gt;drop_ns().  For struct net in case of CONFIG_NET_NS it bumps
the new refcount; net_drop_ns() decrements it and calls net_free() if the
last reference has been dropped.  Method renamed to -&gt;grab_current_ns().
	* old net_free() callers call net_drop_ns() instead.
	* sysfs_exit_ns() is gone, along with a large part of callchain
leading to it; now that the references stored in -&gt;ns[...] stay valid we
do not need to hunt them down and replace them with NULL.  That fixes
problems in sysfs_lookup() and sysfs_readdir(), along with getting rid
of sb-&gt;s_instances abuse.

	Note that struct net *shutdown* logics has not changed - net_cleanup()
is called exactly when it used to be called.  The only thing postponed by
having a sysfs instance refering to that struct net is actual freeing of
memory occupied by struct net.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>kobject: Introduce kset_find_obj_hinted.</title>
<updated>2010-10-22T17:16:44Z</updated>
<author>
<name>Robin Holt</name>
<email>holt@sgi.com</email>
</author>
<published>2010-09-29T19:00:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c25d1dfbd403209025df41a737f82ce8f43d93f5'/>
<id>urn:sha1:c25d1dfbd403209025df41a737f82ce8f43d93f5</id>
<content type='text'>
One call chain getting to kset_find_obj is:
  link_mem_sections()
    find_mem_section()
      kset_find_obj()

This is done during boot.  The memory sections were added in a linearly
increasing order and link_mem_sections tends to utilize them in that
same linear order.

Introduce a kset_find_obj_hinted which is passed the result of the
previous kset_find_obj which it uses for a quick "is the next object
our desired object" check before falling back to the old behavior.

Signed-off-by: Robin Holt &lt;holt@sgi.com&gt;
To: Robert P. J. Day &lt;rpjday@crashcourse.ca&gt;
Reviewed-by: KAMEZAWA Hiroyuki &lt;kamezawa.hiroyu@jp.fujitsu.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>sysfs: Comment sysfs directory tagging logic</title>
<updated>2010-05-21T16:37:31Z</updated>
<author>
<name>Serge E. Hallyn</name>
<email>serue@us.ibm.com</email>
</author>
<published>2010-05-03T21:23:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be867b194a3ae3c680c29521287ae49b4d44d420'/>
<id>urn:sha1:be867b194a3ae3c680c29521287ae49b4d44d420</id>
<content type='text'>
Add some in-line comments to explain the new infrastructure, which
was introduced to support sysfs directory tagging with namespaces.
I think an overall description someplace might be good too, but it
didn't really seem to fit into Documentation/filesystems/sysfs.txt,
which appears more geared toward users, rather than maintainers, of
sysfs.

(Tejun, please let me know if I can make anything clearer or failed
altogether to comment something that should be commented.)

Signed-off-by: Serge E. Hallyn &lt;serue@us.ibm.com&gt;
Cc: Eric W. Biederman &lt;ebiederm@xmission.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: Implement sysfs tagged directory support.</title>
<updated>2010-05-21T16:37:31Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-03-30T18:31:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ff195b011d7decf501a4d55aeed312731094796'/>
<id>urn:sha1:3ff195b011d7decf501a4d55aeed312731094796</id>
<content type='text'>
The problem.  When implementing a network namespace I need to be able
to have multiple network devices with the same name.  Currently this
is a problem for /sys/class/net/*, /sys/devices/virtual/net/*, and
potentially a few other directories of the form /sys/ ... /net/*.

What this patch does is to add an additional tag field to the
sysfs dirent structure.  For directories that should show different
contents depending on the context such as /sys/class/net/, and
/sys/devices/virtual/net/ this tag field is used to specify the
context in which those directories should be visible.  Effectively
this is the same as creating multiple distinct directories with
the same name but internally to sysfs the result is nicer.

I am calling the concept of a single directory that looks like multiple
directories all at the same path in the filesystem tagged directories.

For the networking namespace the set of directories whose contents I need
to filter with tags can depend on the presence or absence of hotplug
hardware or which modules are currently loaded.  Which means I need
a simple race free way to setup those directories as tagged.

To achieve a reace free design all tagged directories are created
and managed by sysfs itself.

Users of this interface:
- define a type in the sysfs_tag_type enumeration.
- call sysfs_register_ns_types with the type and it's operations
- sysfs_exit_ns when an individual tag is no longer valid

- Implement mount_ns() which returns the ns of the calling process
  so we can attach it to a sysfs superblock.
- Implement ktype.namespace() which returns the ns of a syfs kobject.

Everything else is left up to sysfs and the driver layer.

For the network namespace mount_ns and namespace() are essentially
one line functions, and look to remain that.

Tags are currently represented a const void * pointers as that is
both generic, prevides enough information for equality comparisons,
and is trivial to create for current users, as it is just the
existing namespace pointer.

The work needed in sysfs is more extensive.  At each directory
or symlink creating I need to check if the directory it is being
created in is a tagged directory and if so generate the appropriate
tag to place on the sysfs_dirent.  Likewise at each symlink or
directory removal I need to check if the sysfs directory it is
being removed from is a tagged directory and if so figure out
which tag goes along with the name I am deleting.

Currently only directories which hold kobjects, and
symlinks are supported.  There is not enough information
in the current file attribute interfaces to give us anything
to discriminate on which makes it useless, and there are
no potential users which makes it an uninteresting problem
to solve.

Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

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