From: Johannes Berg <johannes@sipsolutions.net>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: [RFC] mac80211: don't assume driver has been attached on registration
Date: Fri, 14 Nov 2008 22:58:58 +0100 [thread overview]
Message-ID: <1226699938.4120.26.camel@johannes.berg> (raw)
In-Reply-To: <1226697147-27997-1-git-send-email-lrodriguez@atheros.com>
[-- Attachment #1: Type: text/plain, Size: 1881 bytes --]
On Fri, 2008-11-14 at 13:12 -0800, Luis R. Rodriguez wrote:
> mac80211's ieee80211_register_hw() is often called within the
> probe path so it cannot assume the device's driver structure
> has been attached yet so to create a workqueue instead of
> using driver->name use the wiphy's phy%d name.
>
> This should fix sporadic oopses found when we race to beat the
> driver pointer setting. Not even sure how this was working properly.
>
> http://www.kerneloops.org/search.php?search=ieee80211_register_hw
Ok, umm, very odd. Why is it sometimes working? It should always fail...
Patch looks ok though, the name of the thing doesn't really matter
anyway...
> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
> ---
>
> Tested with iwlagn. If you are running into this oops please test.
>
> net/mac80211/main.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/net/mac80211/main.c b/net/mac80211/main.c
> index d631dc9..cec9b6d 100644
> --- a/net/mac80211/main.c
> +++ b/net/mac80211/main.c
> @@ -722,7 +722,6 @@ EXPORT_SYMBOL(ieee80211_alloc_hw);
> int ieee80211_register_hw(struct ieee80211_hw *hw)
> {
> struct ieee80211_local *local = hw_to_local(hw);
> - const char *name;
> int result;
> enum ieee80211_band band;
> struct net_device *mdev;
> @@ -787,8 +786,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw)
> mdev->header_ops = &ieee80211_header_ops;
> mdev->set_multicast_list = ieee80211_master_set_multicast_list;
>
> - name = wiphy_dev(local->hw.wiphy)->driver->name;
> - local->hw.workqueue = create_freezeable_workqueue(name);
> + local->hw.workqueue =
> + create_freezeable_workqueue(wiphy_name(local->hw.wiphy));
> if (!local->hw.workqueue) {
> result = -ENOMEM;
> goto fail_workqueue;
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
prev parent reply other threads:[~2008-11-14 21:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-14 21:12 [RFC] mac80211: don't assume driver has been attached on registration Luis R. Rodriguez
2008-11-14 21:58 ` Johannes Berg [this message]
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=1226699938.4120.26.camel@johannes.berg \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=lrodriguez@atheros.com \
/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