2009-07-14 09:42:18 wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77221
Hi, all
I've worked several weeks on usb wifi module , but still can't find a way out. My wifi card is ralink rt2571, which use rt73 driver. I 've tried several expierinces,
1) 2009R1 branches + rt73 + mac80211 + wpa_supplicant 6.9.0/5.8.11
this seems to be the best result till now, except two problems. one is the wifi module would disconnect from time to time. and never get connetted after that. the other is, it can't connect to some wifi router.I have a linksys and a dlink router, it can connect to the linksys router, but failed to connect dlink.I don't know why.
2) The newest trunk by svn rt73 + mac80211 + wpa_supplicant 6.9.0/5.8.11
it failed at the beginning of connection. It's all fine when I insmod the driver module and ifconfig wlan0 up. But corrupt when it scanning the AP. below is the dump message.
I was very discouraged after doing so much work, could anyone give me an advise? Thanks!
/////////////////////////////////////////////////////
## Booting image at 01000000 ...
Image Name: bf527-2.6.30.1-ADI-2010R1-pre-sv
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 2916676 Bytes = 2.8 MB
Load Address: 00100000
Entry Point: 00318944
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
Starting Kernel at = 318944
Linux version 2.6.30.1-ADI-2010R1-pre-svn6995 (wangyixin@svnhost.imagintech.cn) (gcc version 4.1.2 (ADI svn)) #10 Tue Jul 14 21:21:49 CST 2009
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Board Memory: 32MB
Kernel Managed Memory: 32MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00100000-0x0025e940
rodata = 0x0025e940-0x002dfc6c
bss = 0x002e0000-0x002f1240
data = 0x002f1240-0x0030e000
stack = 0x0030c000-0x0030e000
init = 0x0030e000-0x00697000
available = 0x00697000-0x01eff000
DMA Zone = 0x01f00000-0x02000000
Hardware Trace Active and Enabled
Boot Mode: 1
Blackfin support (C) 2004-2009 Analog Devices, Inc.
Compiled for ADSP-BF527 Rev 0.1
Blackfin Linux support by blackfin.uclinux.org/
Processor Speed: 500 MHz core clock and 100 MHz System Clock
NOMPU: setting up cplb tables
Instruction Cache Enabled for CPU0
External memory: cacheable in instruction cache
Data Cache Enabled for CPU0
External memory: cacheable (write-back) in data cache
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 7873
Kernel command line: root=/dev/mtdblock0 rw earlyprintk=serial,uart0,57600 console=ttyBF0,57600 ip=192.168.1.202:192.168.1.190:192.168.1.1:255.255.255.0:bf527-ezkit:eth0:off
NR_IRQS:119
Configuring Blackfin Priority Driven Interrupts
PID hash table entries: 128 (order: 7, 512 bytes)
console handover:boot [early_BFuart0] boot [early_shadow0] -> real [ttyBF0]
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 24704k/32768k RAM, (3620k init code, 1402k kernel code, 702k data, 1024k dma, 1312k reserved)
Calibrating delay loop... 995.32 BogoMIPS (lpj=1990656)
Mount-cache hash table entries: 512
Blackfin Scratchpad data SRAM: 4 KB
Blackfin L1 Data A SRAM: 16 KB (16 KB free)
Blackfin L1 Data B SRAM: 16 KB (16 KB free)
Blackfin L1 Instruction SRAM: 48 KB (44 KB free)
net_namespace: 296 bytes
NET: Registered protocol family 16
Blackfin DMA Controller
ezkit_init(): registering device resources
bio: create slab <bio-0> at 0
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
cfg80211: Calling CRDA to update world regulatory domain
musb_hdrc: version 6.0, pio, host, debug=0
musb_hdrc: kernel must blacklist external hubs
musb_hdrc: USB Host mode controller at ffc03800 using PIO, IRQ 59
musb_hdrc musb_hdrc.0: MUSB HDRC host driver
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 1
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 1024 (order: 1, 8192 bytes)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
TCP: Hash tables configured (established 1024 bind 1024)
TCP reno registered
NET: Registered protocol family 1
JFFS2 version 2.2. (NAND) 漏 2001-2006 Red Hat, Inc.
msgmni has been set to 48
alg: No test for stdrng (krng)
io scheduler noop registered
io scheduler anticipatory registered (default)
io scheduler cfq registered
bfin-t350mcqb: 320x240 24-bit RGB FrameBuffer initializing...
dma_alloc_init: dma_page @ 0x0183e000 - 256 pages at 0x01f00000
Serial: Blackfin serial driver
bfin-uart.1: ttyBF0 at MMIO 0xffc00400 (irq = 29) is a BFIN-UART
bfin-uart.1: ttyBF1 at MMIO 0xffc02000 (irq = 31) is a BFIN-UART
brd: module loaded
Driver 'sd' needs updating - please use bus_type methods
bfin_mii_bus: probed
bfin_mac: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:03, irq=-1, mdc_clk=2500000Hz(mdc_div=19)@sclk=100MHz)
bfin_mac bfin_mac.0: Blackfin on-chip Ethernet MAC driver, Version 1.1
physmap platform flash device: 00400000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
Intel/Sharp Extended Query Table at 0x0035
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
cmdlinepart partition parsing not available
RedBoot partition parsing not available
Using physmap partition information
Creating 3 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "bootloader(nor)"
usb 1-1: new high speed USB device using musb_hdrc and address 2
0x000000040000-0x000000200000 : "linux kernel(nor)"
0x000000200000-0x000000400000 : "file system(nor)"
bfin-spi bfin-spi.0: Blackfin on-chip SPI Controller Driver, Version 1.0, regs_base@ffc00500, dma channel@7
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
TCP cubic registered
NET: Registered protocol family 17
lib80211: common routines for IEEE802.11 drivers
usb 1-1: configuration #1 chosen from 1 choice
IP-Config: Complete:
device=eth0, addr=192.168.1.202, mask=255.255.255.0, gw=192.168.1.1,
host=bf527-ezkit, domain=, nis-domain=(none),
bootserver=192.168.1.190, rootserver=192.168.1.190, rootpath=
Freeing unused kernel memory: 3620k freed
_____________________________________
a8888b. / Welcome to the uClinux distribution \
d888888b. / _ _ \
8P"YP"Y88 / | | |_| __ __ (TM) |
8|o||o|88 _____/ | | _ ____ _ _ \ \/ / |
8' .88 \ | | | | _ \| | | | \ / |
8`._.' Y8. \ | |__ | | | | | |_| | / \ |
d/ `8b. \ \____||_|_| |_|\____|/_/\_\ |
dP . Y8b. \ For embedded processors including |
d8:' " `::88b \ the Analog Devices Blackfin /
d8" 'Y88b \___________________________________/
:8P ' :888
8a. : _a88P For further information, check out:
._/"Yaa_: .| 88P| - blackfin.uclinux.org/
\ YP" `| 8P `. - docs.blackfin.uclinux.org/
/ \.___.d| .' - www.uclinux.org/
`--..__)8888P`._.' jgs/a:f - www.analog.com/blackfin
Have a lot of fun...
BusyBox v1.14.2 (2009-07-14 20:52:59 CST) hush - the humble shell
root:/> PHY: 0:03 - Link is Up - 100/Full
root:/> insmod /lib/modules/2.6.30.1-ADI-2010R1-pre-svn6995/kernel/drivers/net/w
ireless/rt2x00/rt2x00lib.ko
d /lib/modules/2.6.30.1-ADI-2010R1-pre-svn6995/kernel/drivers/net/wireless/rt2x00/rt73usb.ko
root:/> insmod /lib/modules/2.6.30.1-ADI-2010R1-pre-svn6995/kernel/drivers/net/w
ireless/rt2x00/rt2x00usb.ko
root:/> insmod /lib/modules/2.6.30.1-ADI-2010R1-pre-svn6995/kernel/drivers/net/w
ireless/rt2x00/rt73usb.ko
phy0 -> rt2x00_set_chip: Info - Chipset detected - rt: 1300, rf: 0002, rev: 0002573a.
usbcore: registered new interface driver rt73usb
root:/>
root:/> ifconfig wlan0 up
phy0 -> rt2x00lib_request_firmware: Info - Loading firmware file 'rt73.bin'.
rt73usb 1-1:1.0: firmware: requesting rt73.bin
phy0 -> rt2x00lib_request_firmware: Info - Firmware detected - version: 1.7.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 0 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 1 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 2 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.
phy0 -> rt2x00mac_conf_tx: Info - Configured TX queue 3 - CWmin: 5, CWmax: 10, Aifs: 2, TXop: 0.
root:/> iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=20 dBm
Retry min limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
root:/> iwlist wlan0 scanning
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=iwlist PID=254
CPU = 0
TEXT = 0x00520040-0x0052e5e0 DATA = 0x0052e5e4-0x00532594
BSS = 0x00532594-0x00532b04 USER-STACK = 0x00534f74
return address: [0x00242ac4]; contents of:
0x00242aa0: 5ebc add1 0c41 1816 a0c8 0d00 1813 3223
0x00242ab0: 6002 6001 4460 3262 640a acaa 9108 5008
0x00242ac0: 640b 5a82 [9310] ade1 6c20 6541 a0c8 0910
0x00242ad0: 17f4 640f 0c17 6c0f 17e3 aff1 e121 013c
ADSP-BF527-0.1 500(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 2.6.30.1-ADI-2010R1-pre-svn6995 (wangyixin@svnhost.imagintech.cn) (gcc version 4.1.2 (ADI svn)) #10 Tue Jul 14 21:21:49 CST 2009
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060024 IPEND: 8008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x24
physical IVG3 asserted : <0xffa00470> { _trap + 0x0 }
physical IVG15 asserted : <0xffa00c90> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0x00106028> { _timer_interrupt + 0x0 }
logical irq 13 mapped : <0x001aff68> { _bfin_t350mcqb_irq_error + 0x0 }
logical irq 29 mapped : <0x001bc53c> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 30 mapped : <0x001bc948> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x001d1480> { _bfin_mac_interrupt + 0x0 }
logical irq 59 mapped : <0x001ee4f0> { _blackfin_interrupt + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x00645d44> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00242a7a> { _cfg80211_wext_siwscan + 0x8e }
PC : <0x00242ac4> { _cfg80211_wext_siwscan + 0xd8 }
DCPLB_FAULT_ADDR: <0xef000014> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x001032c2> { _show_regs + 0x9a }
PROCESSOR STATE:
R0 : 0196dc00 R1 : 00000000 R2 : 00000001 R3 : 00000001
R4 : 01977000 R5 : 00640060 R6 : 01934000 R7 : 00000000
P0 : 00000000 P1 : 006407ec P2 : 006936a1 P3 : 00640000
P4 : 00640060 P5 : 00693660 FP : 00000000 SP : 00645c68
LB0: 001a3480 LT0: 001a3480 LC0: 00000000
LB1: 001fda0e LT1: 001fd9fc LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 005345b4
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 00534e94
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 00000000 A0.x: 00000000 A1.w: 00000000 A1.x: 00000000
USP : 00534824 ASTAT: 02002000
Hardware Trace:
0 Target : <0x00104140> { _trap_c + 0x0 }
Source : <0xffa00402> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa00364> { _exception_to_level5 + 0x0 }
Source : <0xffa00234> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa0021c> { _bfin_return_from_exception + 0x0 }
Source : <0xffa002b0> { _ex_trap_c + 0x4c } JUMP.S
3 Target : <0xffa00264> { _ex_trap_c + 0x0 }
Source : <0xffa004ca> { _trap + 0x5a } JUMP (P4)
4 Target : <0xffa00470> { _trap + 0x0 }
Source : <0x00242ac2> { _cfg80211_wext_siwscan + 0xd6 } 0x5a82
5 Target : <0x00242a7a> { _cfg80211_wext_siwscan + 0x8e }
Source : <0x0013bd8a> { ___kmalloc + 0x1a } RTS
6 Target : <0x0013bd82> { ___kmalloc + 0x12 }
Source : <0x0013be08> { ___kmalloc + 0x98 } JUMP.S
7 Target : <0x0013be08> { ___kmalloc + 0x98 }
Source : <0x001a3486> { _memset + 0x2e } RTS
8 Target : <0x001a3458> { _memset + 0x0 }
Source : <0x0013be04> { ___kmalloc + 0x94 } CALL pcrel
9 Target : <0x0013bdfa> { ___kmalloc + 0x8a }
Source : <0x0013be1a> { ___kmalloc + 0xaa } JUMP.S
10 Target : <0x0013be0a> { ___kmalloc + 0x9a }
Source : <0x0013bdf4> { ___kmalloc + 0x84 } IF CC JUMP
11 Target : <0x0013bdc4> { ___kmalloc + 0x54 }
Source : <0x0013b4e8> { _slab_should_failslab + 0x8 } RTS
12 Target : <0x0013b4e0> { _slab_should_failslab + 0x0 }
Source : <0x0013bdc0> { ___kmalloc + 0x50 } CALL pcrel
13 Target : <0x0013bd9f> { ___kmalloc + 0x2f }
Source : <0x0013bda4> { ___kmalloc + 0x34 } IF CC JUMP
14 Target : <0x0013bd8c> { ___kmalloc + 0x1c }
Source : <0x0013bd7c> { ___kmalloc + 0xc } IF CC JUMP
15 Target : <0x0013bd70> { ___kmalloc + 0x0 }
Source : <0x00242a76> { _cfg80211_wext_siwscan + 0x8a } CALL pcrel
Kernel Stack
Stack info:
SP: [0x00645f24] <0x00645f24> /* kernel dynamic memory */
Memory from 0x00645f20 to 00646000
00645f20: 00000000 [0052775c] 00008000 00000000 00000000 00646000 0052775c 0052775c
00645f40:<00520a72><ffa00cf4> 02002020 0052451b 00529031 0052451a 00529030 00000000
00645f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645fa0: 00000000 00000000 00000000 019598e8 005345b4 00534824 00534834 00534e74
00645fc0: 00534ad0 00534f9f 00534e83 00534fa4 00000036 00000000 00000000 00000000
00645fe0: 00000008 00000003 00534e74 00008b18 00000003 00000003 00000036 00000006
00646000: 00646084
Return addresses in stack:
address : <0x00520a72> [ iwlist + 0xa32 ]
address : <0xffa00cf4> { _evt_system_call + 0x64 }
Modules linked in: rt73usb rt2x00usb rt2x00lib nfs lockd sunrpc
Kernel panic - not syncing: Kernel exception
Hardware Trace:
Stack info:
SP: [0x00645b80] <0x00645b80> /* kernel dynamic memory */
FP: (0x00645cfc)
Memory from 0x00645b80 to 00646000
00645b80:[002a11d8]<0010ef28> 002e5c68 002a11d8 002e549e 002e549e 002e549e 00645bbc
00645ba0: 00645bbc <001044b6> 00645c68 ffe02014 00640000 002a0b74 00001000 002f3900
00645bc0: 0000003f 007af000 0052f160 00030001 00699000 00001000 00005020 08101010
00645be0: 00001000 00000003 0052f004 0052f004 0052f160 00000006 00000001 00645c9c
00645c00:<001353a8> 00645c9c <0012e488> 006a8680 <00740794> 01cd7460 00001000 00000000
00645c20: 00000014 00000013 00000000 00000020 <001129f0> 00000000 00000000 00000000
00645c40: 00645c9c <ffa00406> 002e2000 00008008 00000006 00640060 01977000 00000020
00645c60: 45984f3f 00000480 00000480 00008008 <00060024> 00000000 00645d44 00000480
00645c80: 00242ac4 <00242a7a> 0196dc00 02002000 001fda0e 001a3480 001fd9fc 001a3480
00645ca0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645cc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645ce0: 00000000 00000000 00000000 00000000 00534e94 005345b4 00534824 (00000000)
00645d00:<00693660> 00640060 00640000 006936a1 <006407ec> 00000000 00000000 01934000
00645d20: 00640060 01977000 00000001 00000001 00000000 0196dc00 0196dc00 00000000
00645d40: 00000006 00644000 00005a40 0194b000 00640000 00008b18 <0023e6d0> 00645e88
00645d60: 00277968 002429ec 00000000 01977000 00000000 00000000 01977000 <00162f1e>
00645d80: 00645e88 01977000 00000000 00000000 0030aa98 00000000 00000002 00000000
00645da0: 00000000 00000000 00000000 00000000 00534834 <0023e8fa> 00277968 00008b18
00645dc0: 002429ec 00000000 01934000 002ef064 00645e78 <0023e3f4> 00000000 0023e5dc
00645de0: 002429ec 01934000 00645e50 <0023e4d0> 00000000 00645e78 00534f9f 00000000
00645e00: 00008b18 002ef064 00645e78 01e99b40 01edd1a0 002ef064 00645e50 002429ec
00645e20: 0023e5dc <0023e946> 00008b18 00008b18 00645e78 00534e74 01efd3e0 002ebb90
00645e40: 01ee1514 00645e50 0023e850 0023e5dc 00008b18 <00200ff4> 00008b18 002ef064
00645e60: 00000000 00534e74 00000000 01edd1a0 00000000 00534e74 6e616c77 00000030
00645e80: 00000000 00000000 00000000 00000000 081c0300 01000415 <00147c46> 0014819c
00645ea0: 00000036 00534e74 00000003 00534e74 00008b18 00534ec0 <001f36ba> 001f3cc0
00645ec0: 00000149 <001480ca> 00000000 001f3cc0 001007b0 0000000b 0014819c <001481c4>
00645ee0: 01cd74e0 00000000 ffffe000 00534fa5 00534e74 00000000 <ffa00600> 00000000
00645f00: ffffe000 00000000 00000008 01927ff3 002f33e4 01ea5c60 00000003 00000008
00645f20: 00000000 0052775c 00008000 00000000 00000000 00646000 0052775c 0052775c
00645f40:<00520a72><ffa00cf4> 02002020 0052451b 00529031 0052451a 00529030 00000000
00645f60: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645f80: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00645fa0: 00000000 00000000 00000000 019598e8 005345b4 00534824 00534834 00534e74
00645fc0: 00534ad0 00534f9f 00534e83 00534fa4 00000036 00000000 00000000 00000000
00645fe0: 00000008 00000003 00534e74 00008b18 00000003 00000003 00000036 00000006
00646000: 00646084
Return addresses in stack:
address : <0x0010ef28> { _panic + 0x4c }
address : <0x001044b6> { _trap_c + 0x376 }
address : <0x001353a8> { _mark_page_accessed + 0x50 }
address : <0x0012e488> { _do_generic_file_read + 0x1fc }
address : <0x00740794> /* kernel dynamic memory */
address : <0x001129f0> { _current_fs_time + 0x14 }
address : <0xffa00406> { _exception_to_level5 + 0xa2 }
address : <0x00060024> /* Maybe null pointer? */
address : <0x00242a7a> { _cfg80211_wext_siwscan + 0x8e }
frame 1 : <0x00693660> /* kernel dynamic memory */
address : <0x006407ec> /* kernel dynamic memory */
address : <0x0023e6d0> { _ioctl_standard_iw_point + 0x88 }
address : <0x00162f1e> { _load_flat_file + 0x796 }
address : <0x0023e8fa> { _ioctl_standard_call + 0xaa }
address : <0x0023e3f4> { _wireless_process_ioctl + 0x1c }
address : <0x0023e4d0> { _wext_ioctl_dispatch + 0x3c }
address : <0x0023e946> { _wext_handle_ioctl + 0x36 }
address : <0x00200ff4> { _dev_ioctl + 0x1b4 }
address : <0x00147c46> { _vfs_ioctl + 0x16 }
address : <0x001f36ba> { _sock_map_fd + 0x22 }
address : <0x001480ca> { _do_vfs_ioctl + 0x5a }
address : <0x001481c4> { _sys_ioctl + 0x28 }
address : <0xffa00600> { _system_call + 0x68 }
address : <0x00520a72> [ iwlist + 0xa32 ]
address : <0xffa00cf4> { _evt_system_call + 0x64 }
QuoteReplyEditDelete
2009-07-14 09:47:37 Re: wifi iwlist corrupt in svn trunk!
Mike Frysinger (UNITED STATES)
Message: 77224
the error message shows you the problem already. there's a unaligned access in cfg80211_wext_siwscan.
QuoteReplyEditDelete
2009-07-14 11:20:48 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77233
Hi, Mike
I notice that it corrupt at cfg80211_wext_siwscan, and there a malloc ,
creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
n_channels * sizeof(void *),
GFP_ATOMIC);
I harking the code by change kzalloc to kmallc and print creq,
// creq = kzalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
// n_channels * sizeof(void *),
// GFP_ATOMIC);
creq = kmalloc(sizeof(*creq) + sizeof(struct cfg80211_ssid) +
n_channels * sizeof(void *),
GFP_ATOMIC);
printk("-->creq = %p\n");
while(1){printk(".");}//added by wyx
the log is like below,
root:/> iwlist wlan0 scanning
-->creq = 0000000c
..................................
why does the creq malloced failed? how to fix it? Thanks!
QuoteReplyEditDelete
2009-07-14 11:24:06 Re: wifi iwlist corrupt in svn trunk!
Mike Frysinger (UNITED STATES)
Message: 77234
malloc fails when you run out of memory
QuoteReplyEditDelete
2009-07-14 11:28:39 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77237
sorry, I made a mistake, I miss the parameter of printk. the last message is not correct!
printk("-->creq = %p\n");
while(1){printk(".");}//added by wyx
---
QuoteReplyEditDelete
2009-07-14 12:06:24 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77244
Hi, Mike
I've found the data misaligned. In the cfg80211_wext_siwscan,
creq->wiphy = wiphy;
creq->ifidx = dev->ifindex;
creq->ssids = (void *)(creq + 1);
creq->channels = (void *)(creq->ssids + 1); <-----------------------this address is not aligned!
creq->n_channels = n_channels;
creq->n_ssids = 1;
because the memory alloccated by length of sizeof(*creq)+sizeof(struct cfg80211_ssid),+n_channels * sizeof(void *), while in cfg80211.h,
struct cfg80211_ssid {
u8 ssid[IEEE80211_MAX_SSID_LEN];
u8 ssid_len; <-----------------------------------------this member cause data aligned !
};
So the creq->channels will not be data aligned!
But how to solve this problem, should I change the struct cfg80211_ssid ?
QuoteReplyEditDelete
2009-07-14 12:18:05 Re: wifi iwlist corrupt in svn trunk!
Mike Frysinger (UNITED STATES)
Message: 77246
i think you're reading the code wrong. adding 1 to a pointer does not increment it by a byte, it increments it by the size of the thing the pointer points to. it's the samething as &foo[1].
QuoteReplyEditDelete
2009-07-14 12:29:34 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77247
I think you misunderstood me. I knew adding 1 is to skip the size of a struct of that pointer.but if the struct size is not data aligned,just like I point out abow, the struct of cfg80211_ssid is 33 bytes long, so the next pointer would be bad!
//below is the log message
-->creq->wiphy = 01e96060
-->creq->channels = 019b26a1
-->creq->ssids = 019b2680
QuoteReplyEditDelete
2009-07-14 12:40:02 Re: wifi iwlist corrupt in svn trunk!
Mike Frysinger (UNITED STATES)
Message: 77250
ah, yes, you would be correct there
try adding __attribute__((aligned)) to the struct definition:
struct cfg80211_ssid {
u8 ssid[IEEE80211_MAX_SSID_LEN];
u8 ssid_len;
} __attribute__((aligned));
QuoteReplyEditDelete
2009-07-14 12:54:40 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77253
HI, Mike
I've changed the struct like you suggested. And it can scan ok now. But new question, when I ifconfig the wlan0 with a ip, it would corrupt. This time, no lucky, I can't see any data mis-aligned data in the function it pointed out. - netif_receive_skb. I don't know what to do now. So tired, I'll have a rest and coninue tomorrow. Thank you!
root:/usr/bin> ifconfig wlan0 192.168.0.228
root:/usr/bin> ping 192.168.0.1
PING 192.168.0.1 (192.168.0.1): 56 data bytes
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
Kernel OOPS in progress
Deferred Exception context
No Valid process in current context
return address: [0x0020a376]; contents of:
0x0020a350: 0015 6408 e610 0015 2fcb e14a 002e e10a
0x0020a360: 1eb4 e512 001a e410 0017 6408 e610 0017
0x0020a370: 2fbf e4a8 0001 [a129] a0ea a163 b0f0 3044
0x0020a380: b133 e3ff f22b 0c00 1f61 e121 ff8f 0808
ADSP-BF527-0.1 500(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 2.6.30.1-ADI-2010R1-pre-svn6995 (wangyixin@svnhost.imagintech.cn) (gcc version 4.1.2 (ADI svn)) #46 Wed Jul 15 00:45:43 CST 2009
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060024 IPEND: c008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x24
physical IVG3 asserted : <0xffa00470> { _trap + 0x0 }
physical IVG14 asserted : <0xffa007a4> { _evt_evt14 + 0x0 }
physical IVG15 asserted : <0xffa00c90> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0x00105fec> { _timer_interrupt + 0x0 }
logical irq 29 mapped : <0x001b6ad8> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 30 mapped : <0x001b6ee4> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x001cba00> { _bfin_mac_interrupt + 0x0 }
logical irq 59 mapped : <0x001e5f5c> { _blackfin_interrupt + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x002fddb0> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x001f636a> { _netif_receive_skb + 0x1e6 }
PC : <0x0020a376> { _ip_rcv_finish + 0x142 }
DCPLB_FAULT_ADDR: <0xef000014> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x0010329e> { _show_regs + 0x9a }
PROCESSOR STATE:
R0 : 00000000 R1 : 00000054 R2 : 00000054 R3 : 00000000
R4 : 00000000 R5 : 01eca258 R6 : 002e202c R7 : 00000008
P0 : 019a8800 P1 : 00000000 P2 : 004e4076 P3 : 002f8cf0
P4 : 01eca1c0 P5 : 004e4062 FP : 002fddc8 SP : 002fdcd4
LB0: 001a2f3c LT0: 001a2f3a LC0: 00000000
LB1: 0023ff84 LT1: 0023ff84 LC1: 00000000
B0 : 00000000 L0 : 00000000 M0 : 00000000 I0 : 01eca204
B1 : 00000000 L1 : 00000000 M1 : 00000000 I1 : 019a8800
B2 : 00000000 L2 : 00000000 M2 : 00000000 I2 : 00000000
B3 : 00000000 L3 : 00000000 M3 : 00000000 I3 : 00000000
A0.w: 00000533 A0.x: 00000000 A1.w: 00000533 A1.x: 00000000
USP : 002fe000 ASTAT: 02003065
Hardware Trace:
0 Target : <0x0010411c> { _trap_c + 0x0 }
Source : <0xffa00402> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa00364> { _exception_to_level5 + 0x0 }
Source : <0xffa00234> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa0021c> { _bfin_return_from_exception + 0x0 }
Source : <0xffa002b0> { _ex_trap_c + 0x4c } JUMP.S
3 Target : <0xffa00264> { _ex_trap_c + 0x0 }
Source : <0xffa004ca> { _trap + 0x5a } JUMP (P4)
4 Target : <0xffa00470> { _trap + 0x0 }
Source : <0x0020a372> { _ip_rcv_finish + 0x13e } 0xe4a8
5 Target : <0x0020a372> { _ip_rcv_finish + 0x13e }
Source : <0x0020a244> { _ip_rcv_finish + 0x10 } IF !CC JUMP
6 Target : <0x0020a234> { _ip_rcv_finish + 0x0 }
Source : <0x0020a786> { _ip_rcv + 0x112 } JUMP.L
7 Target : <0x0020a764> { _ip_rcv + 0xf0 }
Source : <0x0020a72e> { _ip_rcv + 0xba } IF CC JUMP
8 Target : <0x0020a712> { _ip_rcv + 0x9e }
Source : <0x00253bca> { _ip_fast_csum + 0x12 } RTS
9 Target : <0x00253bc2> { _ip_fast_csum + 0xa }
Source : <0x00253ba2> { _do_csum + 0x3a } RTS
10 Target : <0x00253ba0> { _do_csum + 0x38 }
Source : <0x00253b92> { _do_csum + 0x2a } IF !CC JUMP
11 Target : <0x00253b84> { _do_csum + 0x1c }
Source : <0x00253b8e> { _do_csum + 0x26 } IF CC JUMP
12 Target : <0x00253b88> { _do_csum + 0x20 }
Source : <0x00253b80> { _do_csum + 0x18 } IF CC JUMP
13 Target : <0x00253b75> { _do_csum + 0xd }
Source : <0x00253b7c> { _do_csum + 0x14 } IF CC JUMP
14 Target : <0x00253b7a> { _do_csum + 0x12 }
Source : <0x00253b72> { _do_csum + 0xa } JUMP.S
15 Target : <0x00253b68> { _do_csum + 0x0 }
Source : <0x00253bbe> { _ip_fast_csum + 0x6 } CALL pcrel
Kernel Stack
Stack info:
SP: [0x002fdf54] <0x002fdf54> /* kernel dynamic memory */
FP: (0x002fdfb8)
Memory from 0x002fdf50 to 002fe000
002fdf50: 00000000 [00000000] 00000000 00000000 00000000 00000000 003bf9bc 002fe000
002fdf70: 002fe000 00100a80 002fc000 002d3058 002e5760 002e4220 ffa006c4 ffffffc0
002fdf90: 00000000 00000000 00000000 00000002 00000000 006e6640 0000ffff 0000ffff
002fdfb0: ffa006c4 00000006 (002fe000)<00253cbc> ffffffc0 002fe6d0 002de6d8 002d303c
002fdfd0: 00000000 ffffffc0 00000054 00314114 0000003f 00000025 002fe280 00316ae4
002fdff0: 00308ac8 00000000 00000000 ffb00000 (6f636669)
Return addresses in stack:
frame 1 : <0x00253cbc> { _rest_init + 0x54 }
Modules linked in: rt73usb rt2x00usb rt2x00lib nfs lockd sunrpc
Kernel panic - not syncing: Kernel exception
Hardware Trace:
Stack info:
SP: [0x002fdbec] <0x002fdbec> /* kernel dynamic memory */
FP: (0x002fdcac)
Memory from 0x002fdbe0 to 002fe000
002fdbe0: 00000013 002fdbec 002f8cf0 [00296504]<0010ee40> 002ddcd4 00296504 002d849e
002fdc00: 002d849e 002d849e 002fdc28 002fdc28 <00104492> 002fdcd4 ffe02014 002f8cf0
002fdc20: 00295ea0 019dd90c 002e6690 0000003f 00597c00 019dd8c0 00030001 01eca9e0
002fdc40: 002fc000 ffff1eb6 01eca9e0 002fdc80 <001f0908> 01eca9e0 000009eb 000009e0
002fdc60: 01efcce0 019dd90c 002fdca0 <0010c5bc><001db2be> 01e8d6c0 005a37e0 0000000c
002fdc80: 00000998 00000030 <001dbf3c> 01e8d6c0 01ec5000 019ff064 00000000 01e8d6c8
002fdca0: 00000020 01eca9e0 00000002 (002fdd18)<ffa00406> 002d5000 0000c008 00000006
002fdcc0: 01eca258 00000000 0000001d <00588866> 00000480 00000480 0000c008 <00060024>
002fdce0: 00000000 002fddb0 00000480 0020a376 <001f636a> 00000000 02003065 0023ff84
002fdd00: 001a2f3c 0023ff84 001a2f3a 00000000 00000000 00000533 (00000000) 00000533
002fdd20: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002fdd40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 019a8800
002fdd60: 01eca204 002fe000 002fddc8 004e4062 01eca1c0 002f8cf0 004e4076 00000000
002fdd80: 019a8800 00000008 002e202c 01eca258 00000000 00000000 00000054 00000054
002fdda0: 00000000 00000000 019a8800 00000006 00000000 00000010 00000000 00000002
002fddc0:<0020a712><0024ebce> 019a8800 <001f636a> 002e200c 01eca1c0 002f8cf0 00000008
002fdde0: 002e202c 01ec50bc 002e8c00 005af3c8 019a8800 002e75a8 <001f7ebe> 002f6ad8
002fde00: 002f6ad4 002e5760 00000001 00000000 ffff1eb7 00000040 00000000 00000000
002fde20: 00000971 002f6ae4 <001f83b0> 002f6af0 002f6af8 002f6ad4 00000040 0000000c
002fde40: 0000012c ffff1eb9 002f6af0 00000014 00000100 002e5760 <00113078> 002dcda8
002fde60: 002fc000 002dcd84 00000001 0000000c 00000100 00000009 00000000 00000000
002fde80: 002fdfa8 <ffa00934><0012bf4c> 002e9560 002fe000 <0010469a> 002f4290 002fc000
002fdea0: 002d3058 0000003b 00000000 00000000 00000000 0060dade 0010beca <00254b82>
002fdec0:<ffa00934> 00100a80 ffffffc0 00000000 0061f9c6 001a2e5a 00000000 00100aa4
002fdee0: 00008810 00000000 00000000 019f6000 0062e9ac 00100aa4 <001008c0> 0000000b
002fdf00: 02002020 0062eefb 0044e361 0062eef4 0044e354 00000000 00000000 00000010
002fdf20: 00000000 00000010 00000000 00000000 00000000 00000000 00000000 00000000
002fdf40: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002fdf60: 00000000 00000000 003bf9bc 002fe000 002fe000 00100a80 002fc000 002d3058
002fdf80: 002e5760 002e4220 ffa006c4 ffffffc0 00000000 00000000 00000000 00000002
002fdfa0: 00000000 006e6640 0000ffff 0000ffff ffa006c4 00000006 002fe000 <00253cbc>
002fdfc0: ffffffc0 002fe6d0 002de6d8 002d303c 00000000 ffffffc0 00000054 00314114
002fdfe0: 0000003f 00000025 002fe280 00316ae4 00308ac8 00000000 00000000 ffb00000
002fe000: 6f636669
Return addresses in stack:
address : <0x0010ee40> { _panic + 0x4c }
address : <0x00104492> { _trap_c + 0x376 }
address : <0x001f0908> { ___alloc_skb + 0x3c }
address : <0x0010c5bc> { ___wake_up + 0x18 }
address : <0x001db2be> { _map_urb_for_dma + 0x13e }
address : <0x001dbf3c> { _usb_hcd_submit_urb + 0xa4 }
frame 1 : <0xffa00406> { _exception_to_level5 + 0xa2 }
address : <0x00588866> { :rt2x00lib:_rt2x00lib_rxdone + 0x18a }
address : <0x00060024> /* Maybe null pointer? */
address : <0x001f636a> { _netif_receive_skb + 0x1e6 }
address : <0x0020a712> { _ip_rcv + 0x9e }
address : <0x0024ebce> { ___ieee80211_rx + 0x7e }
address : <0x001f636a> { _netif_receive_skb + 0x1e6 }
address : <0x001f7ebe> { _process_backlog + 0x66 }
address : <0x001f83b0> { _net_rx_action + 0x90 }
address : <0x00113078> { ___do_softirq + 0x58 }
address : <0xffa00934> { __common_int_entry + 0x64 }
address : <0x0012bf4c> { _handle_simple_irq + 0x68 }
address : <0x0010469a> { _asm_do_IRQ + 0x36 }
address : <0x00254b82> { _schedule + 0x12 }
address : <0xffa00934> { __common_int_entry + 0x64 }
address : <0x001008c0> { _cpu_idle + 0x20 }
address : <0x00253cbc> { _rest_init + 0x54 }
QuoteReplyEditDelete
2009-07-14 19:43:19 Re: wifi iwlist corrupt in svn trunk!
Robin Getz (UNITED STATES)
Message: 77268
David:
Do the same things - figure out what line of source is causing the problem (with addr2line), and then fix the bug.
-Robin
QuoteReplyEditDelete
2009-07-15 05:42:24 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77330
Hi, Robin
Yes, I'm doing those jobs. But pls see the below sample, it report data mis-aligned, but P2 here is 0x003bdad0, how could it be mis-aligned?
Data access misaligned address violation
- Attempted misaligned data memory or data cache access.
Kernel OOPS in progress
Deferred Exception context
CURRENT PROCESS:
COMM=wpa_supplicant PID=240
CPU = 0
TEXT = 0x005c0000-0x005e4fb4 DATA = 0x00560fb4-0x005628fc
BSS = 0x005628fc-0x019e0000 USER-STACK = 0x019ffe60
return address: [0x004c9ad2]; contents of:
0x004c9ab0: b1e7 2fe5 4a08 b1a0 2fd0 0000 3201 05fc
0x004c9ac0: 3212 3228 3221 6d20 ac41 6380 607a e123
0x004c9ad0: 00ff [a049] 5441 a050 5410 5641 e120 ff0f
0x004c9ae0: 5441 aa90 e122 00f0 4f20 5410 5641 e120
ADSP-BF527-0.1 500(MHz CCLK) 100(MHz SCLK) (mpu off)
Linux version 2.6.30.1-ADI-2010R1-pre-svn6995 (wangyixin@svnhost.imagintech.cn) (gcc version 4.1.2 (ADI svn)) #71 Wed Jul 15 17:20:13 CST 2009
SEQUENCER STATUS: Not tainted
SEQSTAT: 00060024 IPEND: 8008 IMASK: ffff SYSCFG: 0006
EXCAUSE : 0x24
physical IVG3 asserted : <0xffa00470> { _trap + 0x0 }
physical IVG15 asserted : <0xffa00c90> { _evt_system_call + 0x0 }
logical irq 6 mapped : <0x00105fec> { _timer_interrupt + 0x0 }
logical irq 29 mapped : <0x001b6ad8> { _bfin_serial_dma_rx_int + 0x0 }
logical irq 30 mapped : <0x001b6ee4> { _bfin_serial_dma_tx_int + 0x0 }
logical irq 35 mapped : <0x001cba00> { _bfin_mac_interrupt + 0x0 }
logical irq 59 mapped : <0x001e5f5c> { _blackfin_interrupt + 0x0 }
RETE: <0x00000000> /* Maybe null pointer? */
RETN: <0x003bda8c> /* kernel dynamic memory */
RETX: <0x00000480> /* Maybe fixed code section */
RETS: <0x00591904> { :rt2x00lib:_rt2x00lib_config_antenna + 0xe0 }
PC : <0x004c9ad2> /* kernel dynamic memory */
DCPLB_FAULT_ADDR: <0xef000014> /* kernel dynamic memory */
ICPLB_FAULT_ADDR: <0x0010329e> { _show_regs + 0x9a }
PROCESSOR STATE:
R0 : fffffff0 R1 : 00387aa0 R2 : 0000000f R3 : 000000ff
R4 : 00000028 R5 : 00000000 R6 : 003bdad0 R7 : 0039e684
P0 : 00387ac4 P1 : 0059a416 P2 : 003bdad0 P3 : 0064f7e0
P4 : 00387aa0 P5 : 0064f7e0 FP : 003bdad0 SP : 003bd9b0
LB0: 001a2f9c LT0: 001a2f9c LC0: 00000000
LB1: 001a2302 LT1: 001a22f6 LC1: 00000000
B0 : 0000001b L0 : 00000000 M0 : 00000001 I0 : 00000006
B1 : 921fa000 L1 : 00000000 M1 : 00000000 I1 : 0000000f
B2 : 00000000 L2 : 00000000 M2 : c4bd5cb4 I2 : 00000000
B3 : ccba2c1f L3 : 00000000 M3 : b3022303 I3 : 002684bc
A0.w: 00000001 A0.x: 00000000 A1.w: 00000001 A1.x: 00000000
USP : 019ff094 ASTAT: 02003044
Hardware Trace:
0 Target : <0x0010411c> { _trap_c + 0x0 }
Source : <0xffa00402> { _exception_to_level5 + 0x9e } CALL pcrel
1 Target : <0xffa00364> { _exception_to_level5 + 0x0 }
Source : <0xffa00234> { _bfin_return_from_exception + 0x18 } RTX
2 Target : <0xffa0021c> { _bfin_return_from_exception + 0x0 }
Source : <0xffa002b0> { _ex_trap_c + 0x4c } JUMP.S
3 Target : <0xffa00264> { _ex_trap_c + 0x0 }
Source : <0xffa004ca> { _trap + 0x5a } JUMP (P4)
4 Target : <0xffa00470> { _trap + 0x0 }
Source : <0x004c9ace> /* kernel dynamic memory */ 0xe123
5 Target : <0x004c9abc> /* kernel dynamic memory */
Source : <0x00591902> { :rt2x00lib:_rt2x00lib_config_antenna + 0xde } CALL (P2)
6 Target : <0x005918e8> { :rt2x00lib:_rt2x00lib_config_antenna + 0xc4 }
Source : <0x005925f4> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x12c } CALL (P2)
7 Target : <0x005925e8> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x120 }
Source : <0x00591c72> { :rt2x00lib:_rt2x00queue_index_inc + 0x46 } RTS
8 Target : <0x00591c2c> { :rt2x00lib:_rt2x00queue_index_inc + 0x0 }
Source : <0x005925e6> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x11e } CALL (P2)
9 Target : <0x005925da> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x112 }
Source : <0x0059263c> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x174 } JUMP.S
10 Target : <0x00592630> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x168 }
Source : <0x005925d8> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x110 } IF CC JUMP
11 Target : <0x005925ae> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0xe6 }
Source : <0x0059cca4> { :rt2x00usb:_rt2x00usb_write_tx_data + 0xb4 } RTS
12 Target : <0x0059cc9c> { :rt2x00usb:_rt2x00usb_write_tx_data + 0xac }
Source : <0x001f15fc> { _skb_pull + 0x2c } RTS
13 Target : <0x001f15d0> { _skb_pull + 0x0 }
Source : <0x0059cc9a> { :rt2x00usb:_rt2x00usb_write_tx_data + 0xaa } CALL (P2)
14 Target : <0x0059cc52> { :rt2x00usb:_rt2x00usb_write_tx_data + 0x62 }
Source : <0x004c8082> /* kernel dynamic memory */ RTS
15 Target : <0x004c8072> /* kernel dynamic memory */
Source : <0x001a2fe8> { ___modsi3 + 0x2c } RTS
Kernel Stack
Stack info:
SP: [0x003bdf24] <0x003bdf24> /* kernel dynamic memory */
Memory from 0x003bdf20 to 003be000
003bdf20: 00000014 [0062ea74] 00008000 00000000 00000000 003be000 0062ea74 0062ea74
003bdf40:<005cb566><ffa00cf4> 02003025 005c6895 0044e361 005c688e 0044e354 00000000
003bdf60: 00000000 00000000 00000000 00000000 00000000 ccba2c1f 00000000 921fa000
003bdf80: 00000000 00000000 00000000 00000000 00000000 b3022303 c4bd5cb4 00000000
003bdfa0: 10c2b29c 00000080 6cb0af7f 38d4e48d 019fef74 019ff094 019ff0a0 00561888
003bdfc0: 005e526c 005e98e8 00563408 0062ea60 00000146 00000000 004d0338 00000014
003bdfe0: 019ff0c8 00000000 0000007b 004d0338 00000005 00000005 00000146 00000006
003be000: 004ba920
Return addresses in stack:
address : <0x005cb566> [ /usr/bin/wpa_supplicant + 0xb566 ]
address : <0xffa00cf4> { _evt_system_call + 0x64 }
Modules linked in: rt73usb rt2x00usb rt2x00lib nfs lockd sunrpc
Kernel panic - not syncing: Kernel exception
Hardware Trace:
Stack info:
SP: [0x003bd8c8] <0x003bd8c8> /* kernel dynamic memory */
FP: (0x003bd988)
Memory from 0x003bd8c0 to 003be000
003bd8c0:<003bd8c8> 0064f7e0 [00296f7c]<0010ee40> 002dd9b0 00296f7c 002d949e 002d949e
003bd8e0: 002d949e 003bd904 003bd904 <00104492> 003bd9b0 ffe02014 0064f7e0 00296918
003bd900: 002e94d0 002e7690 0000003f 10624dd3 002e76a0 00030001 00000070 <001046b8>
003bd920: 002f5290 00000480 003bdacc 00000006 00000008 <ffa00934> 002dd96c 00000004
003bd940: 0000001d ffffffff 61633030 002e3539 0010f854 00008050 00000000 00000000
003bd960: 003be000 0062ea74 0010f854 <0010f978> 00000006 02003044 001a2302 001a2ed4
003bd980: 001a22f6 001a2ed2 (00000000)<ffa00406> 002d6000 00008008 00000006 00000000
003bd9a0: 00000028 00000000 921fa000 00000480 00000480 00008008 00060024 00000000
003bd9c0: 003bda8c 00000480 004c9ad2 <00591904> fffffff0 02003044 001a2302 001a2f9c
003bd9e0: 001a22f6 001a2f9c 00000000 00000000 00000001 00000000 00000001 00000000
003bda00: ccba2c1f 00000000 921fa000 0000001b 00000000 00000000 00000000 00000000
003bda20: b3022303 c4bd5cb4 00000000 00000001 002684bc 00000000 0000000f 00000006
003bda40: 019ff094 003bdad0 0064f7e0 00387aa0 0064f7e0 003bdad0 0059a416 00387ac4
003bda60: 0039e684 003bdad0 00000000 00000028 000000ff 0000000f 00387aa0 fffffff0
003bda80: fffffff0 00387ac4 00000006 0059ac00 0039e684 0039e684 003bdad0 00000000
003bdaa0: 00000028 00387aa0 <005925f6> 00387ac4 0059ac00 0010f9b8 003bdb10 0059ac00
003bdac0: 0000ffff 019a4b00 019996c0 005a78a0 00000188 00000002 00080005 00040000
003bdae0: 00060000 00000003 000a0004 00000000 00000000 00387aa0 <005911b0> 0039e684
003bdb00: 0064f7e0 00387abc 00000002 0000009d 003bc000 00387aa0 0059a42e 003bdb7c
003bdb20: 00000002 003bdb7c 003bc000 ffffffc0 <00250c4a> 00387aa0 0064f140 003bdb7c
003bdb40: 00000000 00387aa0 019dd6c0 003bdba0 <00250d3a> 0064f140 00387abc 0064f198
003bdb60: 00000000 003bdb7c 00387aa0 0059a500 0059a400 0064f66c 00000000 00387aa0
003bdb80: 019a4800 0064f140 019a4b00 003a3e00 00000000 0064c428 0000888e 00000002
003bdba0: 019a4800 <00251886> 0064f140 019a4b00 019dd6c0 00000000 00387aa0 003bc000
003bdbc0: 00387abc 003a3620 003bdc0c 00000010 00000001 019dd70c <0020208a> 004b8588
003bdbe0: 003c5c00 019dd6c0 00000000 00387aa0 003bc000 fffef620 00387aa0 003bdc1c
003bdc00:<001f4756> 003c5c00 003c5c00 <001f8bf8> 019dd6c0 019dd70c 00387aa0 00000000
003bdc20: ffa65fb8 00000008 0000001a 00000000 00000000 00000000 0059a042 <00251534>
003bdc40: 0059a046 00387aa0 019a4800 00000018 00000000 00000000 00000000 00000000
003bdc60: 0059a050 00000000 0064f140 001f0188 00000188 1f012400 0800c41f 0a817210
003bdc80: 1f012400 0000c41f <001f0908> 00387aa0 019dd50c <0020208a> 01999660 019a4800
003bdca0: 019dd4c0 00000000 00387aa0 003bc000 fffef620 00000000 000004d0 000000eb
003bdcc0: 003bde4c 019a4800 <001f8bf8> 019dd4c0 019dd50c 00387aa0 00000000 00000000
003bdce0: ffff8e88 003bde4c fffffff0 ffff8e88 003bde4c 003b4000 <00234d4a> 019a4800
003bdd00: 00322d20 003bdec0 0000007b 00000000 00000000 00000000 003bde4c 00000000
003bdd20: 0000007b 00387aa0 00000000 019ff0a0 <001ea50e> 00000050 003bde40 00000014
003bdd40: 00000000 003bdec0 003bde34 0000007b 00000000 00000000 00000000 0000007b
003bdd60: 00000000 00000000 00000000 00000001 ffffffff 00000000 00000000 00000000
003bdd80: 00000000 00000000 006e1640 00000000 00000000 00000000 006e1640 0011e8b4
003bdda0: 003bdda0 003bdda0 00000000 00000000 003bdde4 00000000 00000000 00000000
003bddc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
003bdde0: 00000000 00000000 00000000 00000000 0000007b 00322d20 002df27c 00000000
003bde00: 003bdec0 00000000 003bdee8 00000000 019ff0c8 00000000 00000000 00000006
003bde20:<001eada0><001eae16> 00322d20 00000000 019ff0c8 00000000 003bde64 <00109d62>
003bde40: 8e880011 00000004 06000000 1f012400 0000c41f 00fcdcdf <001166e6> 002e5ed8
003bde60: 141513d5 019fef0c 003bde68 003bde68 019fef0c <00126a9e> 00fcdcdf 002e5ed8
003bde80: 141513d5 5a2cb472 00000000 <0012ce90> 00000001 003bde94 003bde94 002e6760
003bdea0:<0012cefc> 002dddbc 003bc000 00000001 00000081 00000004 00000100 <00113078>
003bdec0: 003bde40 00000014 003bdedc 00000001 00000000 00000000 00000000 004d03b3
003bdee0: 00000000 00000000 00000000 <ffa00600> 001ead74 00000146 005e98e8 00000000
003bdf00: ffffe000 00000014 019ff0c8 141513d5 5a2cb472 fc739d8c 00000000 019ff0c8
003bdf20: 00000014 0062ea74 00008000 00000000 00000000 003be000 0062ea74 0062ea74
003bdf40:<005cb566><ffa00cf4> 02003025 005c6895 0044e361 005c688e 0044e354 00000000
003bdf60: 00000000 00000000 00000000 00000000 00000000 ccba2c1f 00000000 921fa000
003bdf80: 00000000 00000000 00000000 00000000 00000000 b3022303 c4bd5cb4 00000000
003bdfa0: 10c2b29c 00000080 6cb0af7f 38d4e48d 019fef74 019ff094 019ff0a0 00561888
003bdfc0: 005e526c 005e98e8 00563408 0062ea60 00000146 00000000 004d0338 00000014
003bdfe0: 019ff0c8 00000000 0000007b 004d0338 00000005 00000005 00000146 00000006
003be000: 004ba920
Return addresses in stack:
address : <0x003bd8c8> /* kernel dynamic memory */
address : <0x0010ee40> { _panic + 0x4c }
address : <0x00104492> { _trap_c + 0x376 }
address : <0x001046b8> { _asm_do_IRQ + 0x54 }
address : <0xffa00934> { __common_int_entry + 0x64 }
address : <0x0010f978> { _vprintk + 0x240 }
frame 1 : <0xffa00406> { _exception_to_level5 + 0xa2 }
address : <0x00591904> { :rt2x00lib:_rt2x00lib_config_antenna + 0xe0 }
address : <0x005925f6> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x12e }
address : <0x005911b0> { :rt2x00lib:_rt2x00mac_tx + 0x6c }
address : <0x00250c4a> { ___ieee80211_tx + 0x52 }
address : <0x00250d3a> { _ieee80211_tx + 0xb2 }
address : <0x00251886> { _ieee80211_master_start_xmit + 0x126 }
address : <0x0020208a> { ___qdisc_run + 0x136 }
address : <0x001f4756> { _dev_pick_tx + 0x16 }
address : <0x001f8bf8> { _dev_queue_xmit + 0x194 }
address : <0x00251534> { _ieee80211_subif_start_xmit + 0x2e0 }
address : <0x001f0908> { ___alloc_skb + 0x3c }
address : <0x0020208a> { ___qdisc_run + 0x136 }
address : <0x001f8bf8> { _dev_queue_xmit + 0x194 }
address : <0x00234d4a> { _packet_sendmsg + 0x19e }
address : <0x001ea50e> { _sock_sendmsg + 0x92 }
address : <0x001eada0> { _sys_sendto + 0x2c }
address : <0x001eae16> { _sys_sendto + 0xa2 }
address : <0x00109d62> { _entity_tick + 0xe }
address : <0x001166e6> { _update_process_times + 0x1e }
address : <0x00126a9e> { _tick_handle_periodic + 0xe }
address : <0x0012ce90> { ___rcu_process_callbacks + 0xac }
address : <0x0012cefc> { _rcu_process_callbacks + 0x2c }
address : <0x00113078> { ___do_softirq + 0x58 }
address : <0xffa00600> { _system_call + 0x68 }
address : <0x005cb566> [ /usr/bin/wpa_supplicant + 0xb566 ]
address : <0xffa00cf4> { _evt_system_call + 0x64 }
QuoteReplyEditDelete
2009-07-15 07:18:22 Re: wifi iwlist corrupt in svn trunk!
Robin Getz (UNITED STATES)
Message: 77342
David:
Did you look at things before you post them?
4 Target : <0xffa00470> { _trap + 0x0 }
Source : <0x004c9ace> /* kernel dynamic memory */ 0xe123
5 Target : <0x004c9abc> /* kernel dynamic memory */
Source : <0x00591902> { :rt2x00lib:_rt2x00lib_config_antenna + 0xde } CALL (P2)
means your module is jumping off into memory that the kernel doesn't own, which is executing random instructions.
Are you building the rt2x00 inside the kernel's build system, or ourside from seperate source?
-Robin
QuoteReplyEditDelete
2009-07-15 08:49:37 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77362
Hi, Robin
I build the rt2x00 driver inside the kernel,
--- Ralink driver support x x
x x < > Ralink rt2500 (USB) support x x
x x <M> Ralink rt2501/rt73 (USB) support x x
x x [*] Ralink debug output x x
x x x
You said the module jump off to other memory, can you explain it more clearly? Pls tell me how to check the instruction of that memory. Thanks!
QuoteReplyEditDelete
2009-07-15 09:18:43 Re: wifi iwlist corrupt in svn trunk!
Robin Getz (UNITED STATES)
Message: 77369
David:
Look in your trace:
4 Target : <0xffa00470> { _trap + 0x0 }
Source : <0x004c9ace> /* kernel dynamic memory */ 0xe123
5 Target : <0x004c9abc> /* kernel dynamic memory */
Source : <0x00591902> { :rt2x00lib:_rt2x00lib_config_antenna + 0xde } CALL (P2)
Something is corrupting P2, and is causing it to go off in the weeds. You should never see kernel dynamic memory as part of the trace. See what line/source that :"rt2x00lib:_rt2x00lib_config_antenna + 0xde" is pointing to...
Something like "bfin-uclinux-addr2line -f -e ./linux-2.6.x/sound/soundcore.ko 0xde". - except point it to your rt2x00lib.ko
-Robin
QuoteReplyEditDelete
2009-07-15 10:31:41 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77379
Hi, Robin
Thanks for you help. I've still problem. When I use bfin-uclinux-addr2line to get the line, how should I give the offset, for example,
1) bfin-uclinux-addr2line -f -e rt2x00lib.ko 0xde
or
2) bfin-uclinux-addr2line -f -e rt2x00lib.ko [the address of rt2x00lib_config_antenna ]+0xde
?
I think I should use the later, am I right? when I choose the first way, I got the source code totlally no in rt2x00lib_config_antenna.
QuoteReplyEditDelete
2009-07-15 11:32:20 Re: wifi iwlist corrupt in svn trunk!
Robin Getz (UNITED STATES)
Message: 77388
David:
It is actually the first...
5 Target : <0x004c9abc> /* kernel dynamic memory */
Source : <0x00591902> { :rt2x00lib:_rt2x00lib_config_antenna + 0xde } CALL (P2)
6 Target : <0x005918e8> { :rt2x00lib:_rt2x00lib_config_antenna + 0xc4 }
Source : <0x005925f4> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x12c } CALL (P2)
7 Target : <0x005925e8> { :rt2x00lib:_rt2x00queue_write_tx_frame + 0x120 }
so if 0xde doesn't work - try 0x120. Also make sure you are using the not-stripped one in the Linux directory, and make sure CONFIG_DEBUG_INFO is on.
-Robin
QuoteReplyEditDelete
2009-07-15 22:22:33 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77412
Hi, Robin
If I use the first way, I got the source code were totally not in the function the trace print out.
[wangyixin@svnhost rt2x00]$ bfin-uclinux-addr2line -f -e rt2x00lib.ko 0xde
rt2x00lib_remove_hw
drivers/net/wireless/rt2x00/rt2x00dev.c:627
[wangyixin@svnhost rt2x00]$ bfin-uclinux-addr2line -f -e rt2x00lib.ko 0x120
rt2x00lib_channel
drivers/net/wireless/rt2x00/rt2x00dev.c:521
[wangyixin@svnhost rt2x00]$
:
QuoteReplyEditDelete
2009-07-16 01:38:17 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77418
Hi, Robin and Mike,
After working on the svn for days, I still not able to fix the problem and found few useful infomation. I compare the newest source codes from rt2x00.serialmonkey.com, they have many differences. I think, I have to give up at this time and wait for your guys to merge the driver to svn later. Thank you all, anyhow!
QuoteReplyEditDelete
2009-07-17 07:43:26 Re: wifi iwlist corrupt in svn trunk!
Robin Getz (UNITED STATES)
Message: 77547
David:
What kernel source are you using? I look in 2009R1 and trunk - and in both - the line drivers/net/wireless/rt2x00/rt2x00dev.c:627 does not appear to be in the function that addr2line says it is - which means that I'm looking at different source.
-Robin
QuoteReplyEditDelete
2009-07-18 23:04:06 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77620
Hi, Robin
I svn the 2009R1 from svn braches at svn checkout svn://sources.blackfin.uclinux.org/uclinux-dist/branches/2009R1
I addattecd the rt2x00dev.c here, pls check if this is the correct one. Thanks!
rt2x00dev.c
QuoteReplyEditDelete
2009-07-19 00:02:59 Re: wifi iwlist corrupt in svn trunk!
david wang (CHINA)
Message: 77621
another , from newest SVN.
rt2x00dev.c