Bug#499527: linux-image-2.6.26-1-686: Kernel Oops with Belkin 54g USB wireless network adapter

2009-06-01 Thread Ben Hutchings
This patch should fix the bug.  All the other cleanup functions called
by rt2x00lib_remove_dev() appear to check for a null argument or for a
flag set by the allocation function before doing anything, so they
should not need additional checks.

This seems safe for a stable update.

Ben.

--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -1198,8 +1198,10 @@
 * Stop all queued work. Note that most tasks will already be halted
 * during rt2x00lib_disable_radio() and rt2x00lib_uninitialize().
 */
-   flush_workqueue(rt2x00dev-workqueue);
-   destroy_workqueue(rt2x00dev-workqueue);
+   if (rt2x00dev-workqueue) {
+   flush_workqueue(rt2x00dev-workqueue);
+   destroy_workqueue(rt2x00dev-workqueue);
+   }
 
/*
 * Free ieee80211_hw memory.
--- END ---

-- 
Ben Hutchings
Logic doesn't apply to the real world. - Marvin Minsky


signature.asc
Description: This is a digitally signed message part


Bug#499527: linux-image-2.6.26-1-686: Kernel Oops with Belkin 54g USB wireless network adapter

2008-09-19 Thread George B.
Package: linux-image-2.6.26-1-686
Version: 2.6.26-2
Severity: important

Hello,

I got an Oops message (see below) when I plugged in a Belkin 54g USB wireless 
network adapter. Looks like upstream is aware of the problem, but I'm reporting 
this here so you can track this.

http://lkml.org/lkml/2008/8/9/31

Workaround from above link:
---
Please note that a workaround is blacklisting rt2500usb and loading
rt73usb directly. (The bug is triggered because rt2500usb is loaded for
a USB device which does not contain rt 2500usb chipset).
---


HTH,

George.

-- Package-specific info:
** Version:
Linux version 2.6.26-1-686 (Debian 2.6.26-2) ([EMAIL PROTECTED]) (gcc version 
4.1.3 20080623 (prerelease) (Debian 4.1.2-23)) #1 SMP Fri Aug 8 18:51:38 UTC 
2008

** Command line:
root=/dev/sda3 ro 

** Tainted: G D (128)

** Kernel log:
[   86.265941] usb 5-5: new high speed USB device using ehci_hcd and address 3
[   86.568746] usb 5-5: configuration #1 chosen from 1 choice
[   86.568746] usb 5-5: New USB device found, idVendor=050d, idProduct=705a
[   86.568746] usb 5-5: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[   86.568746] usb 5-5: Product: Belkin 54g USB Network Adapter
[   86.568746] usb 5-5: Manufacturer: Belkin
[   86.845649] phy1 - rt2500usb_init_eeprom: Error - Invalid RT chipset 
detected.
[   86.845649] phy1 - rt2x00lib_probe_dev: Error - Failed to allocate device.
[   86.845649] BUG: unable to handle kernel NULL pointer dereference at 0010
[   86.845649] IP: [c012efdc] flush_workqueue+0xa/0x3f
[   86.845649] *pde =  
[   86.845649] Oops:  [#1] SMP
[   86.845649] Modules linked in: rt2500usb(+) rt2x00usb rt2x00lib rfkill 
input_polldev i915 drm ipt_REJECT nf_conntrack_ipv4 xt_state nf_conntrack 
xt_tcpudp iptable_filter ip_tables x_tables uinput ppdev parport_pc lp parport 
acpi_cpufreq cpufreq_stats cpufreq_ondemand freq_table cpufreq_powersave 
cpufreq_userspace cpufreq_conservative nls_utf8 ntfs nls_base fuse sbp2 loop 
irtty_sir sir_dev snd_hda_intel ipw3945 pcmcia nsc_ircc iTCO_wdt snd_pcm_oss 
snd_mixer_oss snd_seq_dummy psmouse irda snd_pcm serio_raw crc_ccitt 
snd_seq_oss rng_core ieee80211 ieee80211_crypt snd_seq_midi i2c_i801 usbhid hid 
pcspkr battery ac i2c_core arc4 snd_rawmidi snd_seq_midi_event snd_seq 
ff_memless ecb crypto_blkcipher video output bay snd_timer snd_seq_device 
iwl3945 firmware_class mac80211 snd thinkpad_acpi yenta_socket rsrc_nonstatic 
pcmcia_core button cfg80211 soundcore led_class evdev intel_agp agpgart 
snd_page_alloc nvram ext3 jbd mbcache sd_mod ide_pci_generic ide_core 
ata_generic ohci1394 ieee1394 sdhci ata_piix libata scsi_mod mmc_core ehci_hcd 
uhci_hcd usbcore e1000e dock thermal processor fan thermal_sys
[   86.845649] 
[   86.845649] Pid: 3890, comm: modprobe Not tainted (2.6.26-1-686 #1)
[   86.845649] EIP: 0060:[c012efdc] EFLAGS: 00010246 CPU: 0
[   86.845649] EIP is at flush_workqueue+0xa/0x3f
[   86.845649] EAX:  EBX: f69a5020 ECX: 0046 EDX: 0046
[   86.845649] ESI: c03735ac EDI:  EBP: f785f400 ESP: f1833d84
[   86.845649]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[   86.845649] Process modprobe (pid: 3890, ti=f1832000 task=f68b6240 
task.ti=f1832000)
[   86.845649] Stack: f69a5020 f69a5020 f69a41a0 f8dea222 ffed f8deac2d 
f89b5235 f69a40f0 
[   86.845649]f69a41a0 f69a4a5c 0282 f69a5020 f69a5020  
f69a5020 f69a41a0 
[   86.845649]f785f400 f8de68c9 f337f400 f785f400 f8dfd970  
f8dfd8a0 f88e899a 
[   86.845649] Call Trace:
[   86.845649]  [f8dea222] rt2x00lib_remove_dev+0x30/0x51 [rt2x00lib]
[   86.845649]  [f8deac2d] rt2x00lib_probe_dev+0x31b/0x337 [rt2x00lib]
[   86.845649]  [f89b5235] wiphy_new+0xdb/0xf4 [cfg80211]
[   86.845649]  [f8de68c9] rt2x00usb_probe+0xdd/0x118 [rt2x00usb]
[   86.845649]  [f88e899a] usb_probe_interface+0xad/0xde [usbcore]
[   86.845649]  [c023a425] __driver_attach+0x0/0x55
[   86.845649]  [c023a3ae] driver_probe_device+0xb5/0x12c
[   86.845649]  [c023a45c] __driver_attach+0x37/0x55
[   86.845649]  [c0239cef] bus_for_each_dev+0x37/0x59
[   86.845649]  [c023a249] driver_attach+0x11/0x13
[   86.845649]  [c023a425] __driver_attach+0x0/0x55
[   86.845649]  [c023a04c] bus_add_driver+0x8a/0x1a6
[   86.845649]  [c01dd814] kset_find_obj+0x20/0x4b
[   86.845649]  [c023a63d] driver_register+0x6d/0xc1
[   86.845649]  [f88e85ff] usb_register_driver+0x5d/0xb4 [usbcore]
[   86.845649]  [c013f3cc] sys_init_module+0x184b/0x19bb
[   86.845649]  [c0166149] vma_link+0xa3/0xbd
[   86.845649]  [f8deb25b] rt2x00mac_bss_info_changed+0x0/0xc0 [rt2x00lib]
[   86.845649]  [c0166ba8] do_mmap_pgoff+0x266/0x2b9
[   86.845649]  [c0103853] sysenter_past_esp+0x78/0xb1
[   86.845649]  ===
[   86.845649] Code: 00 74 14 e8 86 ff ff ff 8b 43 20 e8 22 24 00 00 c7 43 20 
00 00 00 00 5b c3 83 c0 10 e9 6d b5 fe ff 57 89 c7 56 be ac 35 37 c0 53 83 78 
10 00 b8 b0 35 37 c0 0f 44 f0 89 f0 e8 0e d9 0a 00 eb 15 
[   86.845649] EIP: [c012efdc]