Thread (4 messages) 4 messages, 2 authors, 2013-09-02

Re: [PATCH] cfg80211: fix potential deadlock regression

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2013-08-30 12:23:12

On Wed, 2013-08-28 at 21:49 +0200, Maxime Bizon wrote:
On Tue, 2013-06-04 at 22:22 +0200, Johannes Berg wrote:
 
quoted
-	rtnl_lock();
 
 	res = device_add(&rdev->wiphy.dev);
+	if (res)
+		return res;
I just ran across a regression caused by this commit
Sorry, yeah ... this was the locking cleanups, we did get this right
before ...
I'm again getting uevent notifications for wireless devices that are not
yet properly registered (ENODEV on NL80211 when using sysfs phy id)

I originally  fixed the bug by taking the cfg80211 mutex across the
whole registration:
[...]

Yeah, but then I got rid of the cfg80211_mutex :)
It does not seem we can reverse the rfkill_register() and device_add()
because wiphy dev is a parent of rfkill dev.

any idea to fix this ?
I think this should be OK:
http://p.sipsolutions.net/28cf9ed446845440.txt, can you try?

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help