Linux wireless drivers development
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: mbizon@freebox.fr
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] cfg80211: fix potential deadlock regression
Date: Fri, 30 Aug 2013 14:23:07 +0200	[thread overview]
Message-ID: <1377865387.16256.15.camel@jlt4.sipsolutions.net> (raw)
In-Reply-To: <1377719389.559.9.camel@sakura.staff.proxad.net>

On Wed, 2013-08-28 at 21:49 +0200, Maxime Bizon wrote:
> On Tue, 2013-06-04 at 22:22 +0200, Johannes Berg wrote:
>  
> > -	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


  reply	other threads:[~2013-08-30 12:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-04 20:22 [PATCH] cfg80211: fix potential deadlock regression Johannes Berg
2013-08-28 19:49 ` Maxime Bizon
2013-08-30 12:23   ` Johannes Berg [this message]
2013-09-02 10:26     ` Maxime Bizon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1377865387.16256.15.camel@jlt4.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mbizon@freebox.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox