Search Linux Wireless

Re: [PATCH 06/13] cfg80211: track monitor interfaces count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Johannes Berg wrote:
On Wed, 2012-07-04 at 13:26 +0200, Johannes Berg wrote:
On Wed, 2012-07-04 at 13:17 +0200, Johannes Berg wrote:
On Wed, 2012-07-04 at 13:12 +0200, Johannes Berg wrote:
Hi Michal,

A few people noticed that these patches cause deadlocks. I think the
reason is that it's not allowed to lock the device here:

  	case NETDEV_DOWN:
  		dev_hold(dev);
+		cfg80211_lock_rdev(rdev);

This causes a deadlock since the interface is set down inside mac80211
when inside a handler from cfg80211 already, or so.

I just reproduce it -- it's because we come from nl80211_del_interface()

Ok ... we don't really need to hold the rdev lock since it's all under
rtnl. Can you please confirm this is safe?

http://p.sipsolutions.net/bde4760671f3e250.txt

I guess we can remove more locking:
http://p.sipsolutions.net/8a1b875a431e72a0.txt

I can't really test it right now, but it looks good to me.


--
Pozdrawiam / Best regards, Michal Kazior.

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux