Oleksij Rempel | 1 Jun 2012 09:37

[PATCH 0/1 ] b43: do not call ieee80211_unregister_hw if we are not registred

Fallwoing patch fixes Oops on rmmod b43. I didn't wonted to pass
cpmplete Oops to the patch description. For those who wont to see it,
here is complete extra oops trace:

P: [<ffffffff8104e988>] drain_workqueue+0x25/0x142
[  139.018775] PGD 153ac6067 PUD 153b82067 PMD 0
[  139.018814] Oops: 0000 [#1] SMP
[  139.018843] CPU 0
[  139.018858] Modules linked in: tun kvm_intel kvm bnep rfcomm binfmt_misc b43(-) mac80211
snd_hda_codec_hdmi snd_hda_codec_idt snd_hda_intel snd_hda_codec i915 cfg80211 snd_hwdep
snd_pcm_oss snd_mixer_oss snd_pcm snd_seq_dummy btusb drm_kms_helper snd_seq_oss bluetooth
snd_seq_midi usb_storage psmouse snd_rawmidi snd_seq_midi_event sr_mod firewire_ohci rfkill
snd_seq firewire_core serio_raw coretemp ssb cdrom snd_timer snd_seq_device snd soundcore
snd_page_alloc crc_itu_t cfbcopyarea cfbimgblt cfbfillrect batman_adv
[  139.019004]
[  139.019004] Pid: 3583, comm: rmmod Not tainted 3.4.0-rc7-00106-gb1dab2f-dirty #167                  /DG45ID
[  139.019004] RIP: 0010:[<ffffffff8104e988>]  [<ffffffff8104e988>] drain_workqueue+0x25/0x142
[  139.019004] RSP: 0018:ffff88014b90fd28  EFLAGS: 00010246
[  139.019004] RAX: 0000000000001f1f RBX: 0000000000000000 RCX: 0000000000000000
[  139.019004] RDX: 000000000000001f RSI: 0000000000000000 RDI: ffffffff819b2c80
[  139.019004] RBP: ffff88014b90fd68 R08: 0000000000000000 R09: ffffffff8189b4d8
[  139.019004] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801a0d97000
[  139.019004] R13: ffff8801a3146c00 R14: 0000000000000001 R15: 0000000000000008
[  139.019004] FS:  00007f2a2fb1c700(0000) GS:ffff8801abc00000(0000) knlGS:0000000000000000
[  139.019004] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  139.019004] CR2: 0000000000000088 CR3: 000000017642c000 CR4: 00000000000407f0
[  139.019004] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  139.019004] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  139.019004] Process rmmod (pid: 3583, threadinfo ffff88014b90e000, task ffff880153946630)
[  139.019004] Stack:
(Continue reading)

Oleksij Rempel | 1 Jun 2012 09:37

[PATCH 1/1] b43: do not call ieee80211_unregister_hw if we are not registred

this patch fixes kernel Oops on "rmmod b43" if firmware was not loaded:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
IP: [<ffffffff8104e988>] drain_workqueue+0x25/0x142
PGD 153ac6067 PUD 153b82067 PMD 0
Oops: 0000 [#1] SMP

Signed-off-by: Oleksij Rempel <bug-track@...>
---
 drivers/net/wireless/b43/b43.h  |    4 ++++
 drivers/net/wireless/b43/main.c |   19 ++++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 67c13af..c06b6cb 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
 <at>  <at>  -877,6 +877,10  <at>  <at>  struct b43_wl {
 	 * from the mac80211 subsystem. */
 	u16 mac80211_initially_registered_queues;

+	/* Set this if we call ieee80211_register_hw() and check if we call
+	 * ieee80211_unregister_hw(). */
+	bool hw_registred;
+
 	/* We can only have one operating interface (802.11 core)
 	 * at a time. General information about this interface follows.
 	 */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index e4d6dc2..747079b 100644
(Continue reading)

Seth Forshee | 5 Jun 2012 18:49
Picon

Re: [PATCH 1/1] b43: do not call ieee80211_unregister_hw if we are not registred

(I don't have access to the original message, so I appologize if any
 Cc's were dropped. I added some additional Cc's.)

On Fri, Jun 01, 2012 at 09:37:20AM +0200, Oleksij Rempel wrote:
> this patch fixes kernel Oops on "rmmod b43" if firmware was not loaded:
> 
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
> IP: [<ffffffff8104e988>] drain_workqueue+0x25/0x142
> PGD 153ac6067 PUD 153b82067 PMD 0
> Oops: 0000 [#1] SMP
> 
> Signed-off-by: Oleksij Rempel <bug-track-M18mAb7Tlt0yCq4wW13eYl6hYfS7NtTn@...>

This issue is affecting the Ubuntu installer, and I've verified the
patch fixes the problem on a Mac Mini 5,2.

Tested-by: Seth Forshee <seth.forshee@...>

This issue affects 3.4, probably introduced in 6b6fa58 (b43: Load
firmware from a work queue and not from the probe routine), so I'd
suggest a Cc for stable also be added.

> ---
>  drivers/net/wireless/b43/b43.h  |    4 ++++
>  drivers/net/wireless/b43/main.c |   19 ++++++++++++-------
>  2 files changed, 16 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
> index 67c13af..c06b6cb 100644
> --- a/drivers/net/wireless/b43/b43.h
(Continue reading)

John W. Linville | 5 Jun 2012 20:24
Favicon

Re: [PATCH 1/1] b43: do not call ieee80211_unregister_hw if we are not registred

Could someone repost a clean version to linux-wireless@...?

On Tue, Jun 05, 2012 at 11:49:45AM -0500, Seth Forshee wrote:
> (I don't have access to the original message, so I appologize if any
>  Cc's were dropped. I added some additional Cc's.)
> 
> On Fri, Jun 01, 2012 at 09:37:20AM +0200, Oleksij Rempel wrote:
> > this patch fixes kernel Oops on "rmmod b43" if firmware was not loaded:
> > 
> > BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
> > IP: [<ffffffff8104e988>] drain_workqueue+0x25/0x142
> > PGD 153ac6067 PUD 153b82067 PMD 0
> > Oops: 0000 [#1] SMP
> > 
> > Signed-off-by: Oleksij Rempel <bug-track-M18mAb7Tlt0yCq4wW13eYl6hYfS7NtTn@...>
> 
> This issue is affecting the Ubuntu installer, and I've verified the
> patch fixes the problem on a Mac Mini 5,2.
> 
> Tested-by: Seth Forshee <seth.forshee@...>
> 
> This issue affects 3.4, probably introduced in 6b6fa58 (b43: Load
> firmware from a work queue and not from the probe routine), so I'd
> suggest a Cc for stable also be added.
> 
> > ---
> >  drivers/net/wireless/b43/b43.h  |    4 ++++
> >  drivers/net/wireless/b43/main.c |   19 ++++++++++++-------
> >  2 files changed, 16 insertions(+), 7 deletions(-)
> > 
(Continue reading)

Seth Forshee | 5 Jun 2012 20:53
Favicon

[PATCH] b43: do not call ieee80211_unregister_hw if we are not registred

From: Oleksij Rempel <bug-track@...>

this patch fixes kernel Oops on "rmmod b43" if firmware was not loaded:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000088
IP: [<ffffffff8104e988>] drain_workqueue+0x25/0x142
PGD 153ac6067 PUD 153b82067 PMD 0
Oops: 0000 [#1] SMP

Cc: stable@...
Signed-off-by: Oleksij Rempel <bug-track@...>
Tested-by: Seth Forshee <seth.forshee@...>
---
 drivers/net/wireless/b43/b43.h  |    4 ++++
 drivers/net/wireless/b43/main.c |   19 ++++++++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 67c13af..c06b6cb 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
 <at>  <at>  -877,6 +877,10  <at>  <at>  struct b43_wl {
 	 * from the mac80211 subsystem. */
 	u16 mac80211_initially_registered_queues;

+	/* Set this if we call ieee80211_register_hw() and check if we call
+	 * ieee80211_unregister_hw(). */
+	bool hw_registred;
+
 	/* We can only have one operating interface (802.11 core)
(Continue reading)


Gmane