<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/base/core.c, branch v2.6.35</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v2.6.35</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v2.6.35'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2010-07-26T15:05:31Z</updated>
<entry>
<title>Driver-core: Always create class directories for classses that support namespaces.</title>
<updated>2010-07-26T15:05:31Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-07-25T05:43:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24b1442d01ae155ea716dfb94ed21605541c317d'/>
<id>urn:sha1:24b1442d01ae155ea716dfb94ed21605541c317d</id>
<content type='text'>
This fixes the regression in 2.6.35-rcX where bluetooth network devices
would fail to be deleted from sysfs, causing their destruction and
recreation to fail.  In addition this fixes the mac80211_hwsim driver
where it would leave around sysfs files when the driver was removed.

This problem is discussed at
  https://bugzilla.kernel.org/show_bug.cgi?id=16257

The reason for the regression is that the network namespace support
added to sysfs expects and requires that network devices be put in
directories that can contain only network devices.

Today get_device_parent almost provides that guarantee for all class
devices, except for a specific exception when the parent of a class
devices is a class device.  It would be nice to simply remove that
arguably incorrect special case, but apparently the input devices depend
on it being there.  So I have only removed it for class devices with
network namespace support.  Which today are the network devices.

It has been suggested that a better fix would be to change the parent
device from a class device to a bus device, which in the case of the
bluetooth driver would change /sys/class/bluetooth to /sys/bus/bluetoth,
I can not see how we would avoid significant userspace breakage if we
were to make that change.

Adding an extra directory in the path to the device will also be
userspace visible but it is much less likely to break things.
Everything is still accessible from /sys/class (for example), and it
fixes two bugs.  Adding an extra directory fixes a 3 year old regression
introduced with the new sysfs layout that makes it impossible to rename
bnep0 network devices to names that conflict with hci device attributes
like hci_revsion.  Adding an additional directory removes the new
failure modes introduced by the network namespace code.

If it weren't for the regession in the renaming of network devices I
would figure out how to just make the sysfs code deal with this
configuration of devices.

In summary this patch fixes regressions by changing:
"/sys/class/bluetooth/hci0/bnep0" to "/sys/class/bluetooth/hci0/net/bnep0".

Reported-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Reported-by: Janusz Krzysztofik &lt;jkrzyszt@tis.icnet.pl&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE</title>
<updated>2010-05-21T16:37:32Z</updated>
<author>
<name>Christoph Egger</name>
<email>siccegge@cs.fau.de</email>
</author>
<published>2010-05-17T14:57:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1d9e882ba4971f31473dd812da64909f30a6c242'/>
<id>urn:sha1:1d9e882ba4971f31473dd812da64909f30a6c242</id>
<content type='text'>
In this code section the final S of CONFIG_MODULES was missed making
the whole check useless

Signed-off-by: Christoph Egger &lt;siccegge@cs.fau.de&gt;
Cc: Mark McLoughlin &lt;markmc@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: Implement ns directory support for device classes.</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:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f349cf34731c3b3eddbcd63cb04489aee2c405bd'/>
<id>urn:sha1:f349cf34731c3b3eddbcd63cb04489aee2c405bd</id>
<content type='text'>
device_del and device_rename were modified to use
sysfs_delete_link and sysfs_rename_link respectively to ensure
when these operations happen on devices whose classes
are in namespace directories they work properly.

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>
<entry>
<title>kobj: Add basic infrastructure for dealing with namespaces.</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:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc451f2058238013e1cdf4acd443c01734d332f0'/>
<id>urn:sha1:bc451f2058238013e1cdf4acd443c01734d332f0</id>
<content type='text'>
Move complete knowledge of namespaces into the kobject layer
so we can use that information when reporting kobjects to
userspace.

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>Driver core: Protect device shutdown from hot unplug events.</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Hugh Daschbach</name>
<email>hdasch@broadcom.com</email>
</author>
<published>2010-03-22T17:36:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6245838fe4d2ce4aab52f543224f7d1212d9155c'/>
<id>urn:sha1:6245838fe4d2ce4aab52f543224f7d1212d9155c</id>
<content type='text'>
While device_shutdown() walks through devices_kset to shutdown all
devices, device unplug events may race to shutdown individual devices.
Specifically, sd_shutdown(), on behalf of fc_starget_delete(), has
been observed deleting devices during device_shutdown()'s list
traversal.  So we factor out list_for_each_entry_safe_reverse(...) in
favor of while (!list_empty(...)).

Signed-off-by: Hugh Daschbach &lt;hdasch@broadcom.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>lockdep: Add novalidate class for dev-&gt;mutex conversion</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2010-03-19T00:37:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1704f47b50b5d9e1b825e43e1baaf2c5897baf03'/>
<id>urn:sha1:1704f47b50b5d9e1b825e43e1baaf2c5897baf03</id>
<content type='text'>
The conversion of device-&gt;sem to device-&gt;mutex resulted in lockdep
warnings. Create a novalidate class for now until the driver folks
come up with separate classes. That way we have at least the basic
mutex debugging coverage.

Add a checkpatch error so the usage is reserved for device-&gt;mutex.

[ tglx: checkpatch and compile fix for LOCKDEP=n ]

Signed-off-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>drivers/base: Convert dev-&gt;sem to mutex</title>
<updated>2010-05-21T16:37:30Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2010-01-29T20:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2'/>
<id>urn:sha1:3142788b7967ccfd2f1813ee9e11aeb1e1cf7de2</id>
<content type='text'>
The semaphore is semantically a mutex. Convert it to a real mutex and
fix up a few places where code was relying on semaphore.h to be included
by device.h, as well as the users of the trylock function, as that value
is now reversed.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>Driver core: don't initialize wakeup flags</title>
<updated>2010-05-21T16:37:29Z</updated>
<author>
<name>Alan Stern</name>
<email>stern@rowland.harvard.edu</email>
</author>
<published>2010-03-08T21:46:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ffa156590f98b750161757a16c37ac8e152a7859'/>
<id>urn:sha1:ffa156590f98b750161757a16c37ac8e152a7859</id>
<content type='text'>
This patch (as1351) removes an unnecessary and unwanted assignment
from device_initialize().  The wakeup flags are set to 0 along with
everything else when the device structure is allocated, so we don't
need to do it again.  Furthermore, the subsystem might already have
set these flags to their correct values; we don't want to override it.

Signed-off-by: Alan Stern &lt;stern@rowland.harvard.edu&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver-core: document ERR_PTR() return values</title>
<updated>2010-03-19T14:12:21Z</updated>
<author>
<name>Jani Nikula</name>
<email>ext-jani.1.nikula@nokia.com</email>
</author>
<published>2010-03-11T16:11:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f0eae0ed3b7d4182a6b4dd03540a738518ea3163'/>
<id>urn:sha1:f0eae0ed3b7d4182a6b4dd03540a738518ea3163</id>
<content type='text'>
A number of functions in the driver core return ERR_PTR() values on
error. Document this in the kernel-doc of the functions.

Signed-off-by: Jani Nikula &lt;ext-jani.1.nikula@nokia.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>driver core: Use sysfs_rename_link in device_rename</title>
<updated>2010-03-08T01:04:52Z</updated>
<author>
<name>Eric W. Biederman</name>
<email>ebiederm@xmission.com</email>
</author>
<published>2010-02-13T03:22:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2354dcc7218853a6537ec722be40fde9a11c413b'/>
<id>urn:sha1:2354dcc7218853a6537ec722be40fde9a11c413b</id>
<content type='text'>
Don't open code the renaming of symlinks in sysfs
instead use the new helper function sysfs_rename_link

Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Serge Hallyn &lt;serue@us.ibm.com&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>
</feed>
