From: Jiri Benc <jbenc@suse.cz>
To: netdev@vger.kernel.org
Cc: "John W. Linville" <linville@tuxdriver.com>
Subject: [PATCH 6/6] d80211: fix rtnl locking in ieee80211_register_hw
Date: Mon, 29 Jan 2007 18:48:11 +0100 (CET) [thread overview]
Message-ID: <20070129174811.753724849D@silver.suse.cz> (raw)
In-Reply-To: <20070129184707.885764375.midnight@suse.cz>
rtnl locking in ieee80211_register_hw was racy. This patch fixes that.
Unfortunatelly, the creation of master interface has to be still protected
by rtnl lock as we need to protect against addition of a new virtual
interface.
Signed-off-by: Jiri Benc <jbenc@suse.cz>
---
net/d80211/ieee80211.c | 4 +---
1 files changed, 1 insertion(+), 3 deletions(-)
--- dscape.orig/net/d80211/ieee80211.c
+++ dscape/net/d80211/ieee80211.c
@@ -4540,12 +4540,10 @@ int ieee80211_register_hw(struct ieee802
result = register_invisible_netdevice(local->mdev);
if (result < 0) {
- rtnl_unlock();
goto fail_dev;
}
result = ieee80211_init_rate_ctrl_alg(local, NULL);
- rtnl_unlock();
if (result < 0) {
printk(KERN_DEBUG "wiphy%d: Failed to initialize rate control "
"algorithm\n", local->hw.index);
@@ -4564,7 +4562,6 @@ int ieee80211_register_hw(struct ieee802
ieee80211_install_qdisc(local->mdev);
/* add one default STA interface */
- rtnl_lock();
result = ieee80211_if_add(local->mdev, "wlan%d", 1, &sta_dev);
if (result == 0)
ieee80211_if_set_type(sta_dev, IEEE80211_IF_TYPE_STA);
@@ -4581,6 +4578,7 @@ fail_wep:
fail_rate:
unregister_invisible_netdevice(local->mdev);
fail_dev:
+ rtnl_unlock();
sta_info_stop(local);
fail_sta_info:
ieee80211_dev_sysfs_del(local);
next prev parent reply other threads:[~2007-01-29 17:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 17:48 [RFC PATCH 1/6] invisible network devices Jiri Benc
2007-01-29 17:48 ` [PATCH 2/6] d80211: use invisible network device for wmaster Jiri Benc
2007-01-29 17:48 ` [PATCH 3/6] d80211: drop packets from nonexisting interfaces in PS mode Jiri Benc
2007-01-29 17:48 ` [PATCH 4/6] d80211: don't display name of invisible network device Jiri Benc
2007-01-30 13:47 ` Johannes Berg
2007-01-30 14:00 ` Jan Kiszka
2007-01-31 18:58 ` Johannes Berg
2007-02-01 15:17 ` Jiri Benc
2007-02-01 15:19 ` Johannes Berg
2007-01-29 17:48 ` [PATCH 5/6] d80211: remove useless callbacks from wmaster Jiri Benc
2007-01-29 17:48 ` Jiri Benc [this message]
2007-01-29 17:48 ` d80211: a patch for standalone d80211 tarball Jiri Benc
2007-01-29 18:34 ` Ivo Van Doorn
2007-01-29 20:23 ` Pavel Roskin
2007-01-31 18:06 ` Jiri Benc
2007-01-29 18:28 ` [RFC PATCH 1/6] invisible network devices Stephen Hemminger
2007-01-29 22:09 ` [RFC] Alternative hidden netwirk device interface Stephen Hemminger
2007-01-30 10:09 ` Christoph Hellwig
2007-01-31 18:26 ` Jiri Benc
2007-01-31 18:40 ` Stephen Hemminger
2007-02-21 8:04 ` David Miller
2007-01-30 10:08 ` [RFC PATCH 1/6] invisible network devices Christoph Hellwig
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=20070129174811.753724849D@silver.suse.cz \
--to=jbenc@suse.cz \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).