Bug 44361
Summary: | rt61pci kernel panic during shut down | ||
---|---|---|---|
Product: | Networking | Reporter: | Łukasz Żarnowiecki (lukasz) |
Component: | Wireless | Assignee: | Stanislaw Gruszka (stf_xl) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | florian, linville, stf_xl |
Priority: | P1 | ||
Hardware: | All | ||
OS: | Linux | ||
Kernel Version: | 3.3.8 | Subsystem: | |
Regression: | No | Bisected commit-id: | |
Attachments: |
objdump
limit_calltrace_to_10_entries.patch limit_calltrace_to_10_entries_for_3.3.patch rt61pci_use_hw_conf.patch |
Description
Łukasz Żarnowiecki
2012-07-09 14:57:40 UTC
You can't provide the full kernel panic information? Can you provide the backtrace? Have you tried this on a 3.4 or later kernel? Panic information could be gathered using a photo camera and then you'll need to attach photo here. Not sure if this could be fixed on kernel newer than 3.3, but it worth to try that. How to provide the backtrace? No, I'm not tried on 3.4 kernel. Here is the photo from camera of kernel panic: http://i.imgur.com/Gbr3e.jpg Please run this command on your kernel sources: objdump -d -r --prefix-addresses drivers/net/wireless/rt2x00/rt61pci.ko > rt61pci.txt and attach rt61pci.txt file using "Add an attachment" option. Also would be good if you could compile kernel with CONFIG_DEBUG_INFO (if not already compiled with that option) and provide output of: gdb drivers/net/wireless/rt2x00/rt61pci.ko (gdb) l *(rt61pci_config + 0x1d) Created attachment 75241 [details]
objdump
I don't know how to use gdb, what I need to type in this: GNU gdb (Gentoo 7.3.1 p2) 7.3.1 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". For bug reporting instructions, please see: <http://bugs.gentoo.org/>... Reading symbols from /lib64/modules/3.3.8-gentoo/kernel/drivers/net/wireless/rt2x00/rt61pci.ko...(no debugging symbols found)...done. Debug mode is enabled in kernel module... You (In reply to comment #6) > > /lib64/modules/3.3.8-gentoo/kernel/drivers/net/wireless/rt2x00/rt61pci.ko...(no > Debug mode is enabled in kernel module... You have to do this on kernel source not installation (symbols are stripped otherwise installation will have hundreds of MBs) for example: gdb /usr/src/linux/drivers/net/wireless/rt2x00/rt61pci.ko I think this bug happen because at static void rt61pci_config_lna_gain(struct rt2x00_dev *rt2x00dev, struct rt2x00lib_conf *libconf) { u16 eeprom; short lna_gain = 0; if (libconf->conf->channel->band == IEEE80211_BAND_2GHZ) { if (test_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags)) lna_gain += 14; libconf->conf->channel or libconf->conf is NULL. Reason of that is unknown. Unfortunately photo from comment 3 does not show top of calltrace, so is hard to tell why those values are NULL. If you do iwconfig wlan0 power off does that workaround the problem ? 1. When I restarting the computer the problem not exist only when shutting down. 2. I've made object dump on module in /lib/modules Reading symbols from /usr/src/linux-3.3.8-gentoo/drivers/net/wireless/rt2x00/rt61pci.ko...(no debugging symbols found)...done. cat .config | grep RT2X00 CONFIG_RT2X00=y CONFIG_RT2X00_LIB_PCI=m CONFIG_RT2X00_LIB=m CONFIG_RT2X00_LIB_FIRMWARE=y CONFIG_RT2X00_LIB_CRYPTO=y CONFIG_RT2X00_LIB_LEDS=y CONFIG_RT2X00_DEBUG=y "iwconfig wlan0 power off does that workaround the problem ?" No, it doesn't > Reading symbols from
> /usr/src/linux-3.3.8-gentoo/drivers/net/wireless/rt2x00/rt61pci.ko...(no
> debugging symbols found)...done.
>
> cat .config | grep RT2X00
> CONFIG_RT2X00=y
> CONFIG_RT2X00_LIB_PCI=m
> CONFIG_RT2X00_LIB=m
> CONFIG_RT2X00_LIB_FIRMWARE=y
> CONFIG_RT2X00_LIB_CRYPTO=y
> CONFIG_RT2X00_LIB_LEDS=y
> CONFIG_RT2X00_DEBUG=y
Kernel has to be compiled with CONFIG_DEBUG_INFO , check that on your .config
0x37ad is in rt61pci_config (drivers/net/wireless/rt2x00/rt61pci.c:850). 845 struct rt2x00lib_conf *libconf) 846 { 847 u16 eeprom; 848 short lna_gain = 0; 849 850 if (libconf->conf->channel->band == IEEE80211_BAND_2GHZ) { 851 if (test_bit(CAPABILITY_EXTERNAL_LNA_BG, &rt2x00dev->cap_flags)) 852 lna_gain += 14; 853 854 rt2x00_eeprom_read(rt2x00dev, EEPROM_RSSI_OFFSET_BG, &eeprom); libconf->conf or libconf->conf->channel is NULL. Unfortunately this is not sufficient information to fix this bug. Begin of the calltrace is missing in photo from comment 3, so it's not possible to tell why NULL pointer is there. Can you grab the full calltrace using serial console or netconsole ? Tell me how to do this and what I need. To use netconsole, you need to have ethernet cable connected to the network and access to second machine in the network. Some documentation is here: http://www.kernel.org/doc/Documentation/networking/netconsole.txt https://wiki.ubuntu.com/Kernel/Netconsole Setup serial console is a bit more difficult, if you do not have this already done it's not wort to bother with that. If you will have troubles to setup netconsole, I'll prepare patch to make call trace shorter, so will be possible to photo all needed information. One more thing. You did not try 3.4 or 3.5 yet, right? It worth to try them, perhaps bug is already fixed there. OK, I try to do this at the end of the week. Just like I mentioned I wanna make the kernel better, I don't need to use that card, because I've already another one. By the way, I'm from Poland ;) Make a call trace patch, I've got some problem with netconsole. Created attachment 76221 [details]
limit_calltrace_to_10_entries.patch
Patch limiting call trace output.
Created attachment 76231 [details]
limit_calltrace_to_10_entries_for_3.3.patch
Same patch for kernel 3.3
How to apply that patch? On kernel source directory: patch -p1 < /path/to/patch I didn't have much time lately, but http://i.imgur.com/nh02A.jpg Created attachment 76661 [details]
rt61pci_use_hw_conf.patch
Proposed fix. Does crash gone and device works with this patch?
Yeah, crash gone and device works fine. Excelent! Could you provide the same for the newer version of kernel? I suppose problem exist in 3.4 and 3.5 too. Patch do not change for newer kernels. I'll post it soon upstream. Post link to commit, thanks. A patch referencing this bug report has been merged in Linux v3.6-rc2: commit deee0214def5d8a32b8112f11d9c2b1696e9c0cb Author: Stanislaw Gruszka <sgruszka@redhat.com> Date: Fri Aug 3 12:49:14 2012 +0200 rt61pci: fix NULL pointer dereference in config_lna_gain |