rt73usb master kernel oops/panic with latest from git

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5488

azeey

09-07-2009 02:35:14

Hello,
I have been using the latest code as of today (07/08/09) from git to get my RT2571WF usb chipset (which lsusb recognizes as Qcom RT2573) working in master mode with hostapd for about a week now. Everything has been working great except a few kernel oopses and panics. I am using it on an embedded system with a Vortex86DX (i486) processor. After running the system for a while ( atleast 2hrs), i get a kernel oops and even a panic sometimes. At the time the following fault happened, I had nothing connected to the wifi and sshd was using an ethernet connection. The bug looks like it has something to do with dma allocation. In order to get a certain feature to work on the processor I am using, I have modified the dma1 memory range to be 0x00-0x0f instead of 0x00-0x1f in arch/x86/kernel/setup.c. From what I know so far this shouldn't cause any problems with dma but I am just mentioning it if any one else knows otherwise. Please let me know if you need more information.

Thanks

[codeybavidlz]
[11815.087538] BUG: spinlock bad magic on CPU#0, sshd/1217
[11815.087560] lock: cfbf6f78, .magic: 00ad01ad, .owner: <none>/-1, .owner_cpu: -1
[11815.087560] Pid: 1217, comm: sshd Not tainted 2.6.30-wl #6
[11815.087560] Call Trace:
[11815.087560] [<c035250c>] ? printk+0x18/0x1a
[11815.087560] [<c022750f>] spin_bug+0x9f/0xf0
[11815.087560] [<c0227644>] _raw_spin_lock+0x24/0x110
[11815.087560] [<c035494c>] ? _spin_unlock_irqrestore+0x2c/0x40
[11815.087560] [<c0354aa3>] _spin_lock_irqsave+0x23/0x30
[11815.087560] [<c0165cdd>] dma_pool_alloc+0x1d/0x2c0
[11815.087560] [<c0107650>] ? sched_clock+0x20/0x70
[11815.087560] [<c02888ad>] ehci_qtd_alloc+0x1d/0x70
[11815.087560] [<c028891a>] qh_urb_transaction+0x1a/0x3b0
[11815.087560] [<c013be6e>] ? tick_periodic+0x2e/0x80
[11815.087560] [<c013bed8>] ? tick_handle_periodic+0x18/0x90
[11815.087560] [<c028d3b7>] ? urb_free_priv+0x57/0x60
[11815.087560] [<c0289a09>] ehci_urb_enqueue+0x69/0xe40
[11815.087560] [<c0354986>] ? _spin_unlock+0x26/0x30
[11815.087560] [<c0146422>] ? handle_level_irq+0xa2/0xe0
[11815.087560] [<c0104c74>] ? handle_irq+0x34/0x60
[11815.087560] [<c0122480>] ? irq_exit+0x30/0x50
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c027a424>] usb_hcd_submit_urb+0x164/0x9a0
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c0110e60>] ? kernel_map_pages+0xf0/0x110
[11815.087560] [<c0167427>] ? cache_alloc_debugcheck_after+0x47/0x1e0
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c01072fc>] ? pit_read+0x7c/0xe0
[11815.087560] [<c0138946>] ? getnstimeofday+0x56/0x110
[11815.087560] [<c0138a11>] ? do_gettimeofday+0x11/0x40
[11815.087560] [<c027b02f>] usb_submit_urb+0xff/0x260
[11815.087560] [<c027077f>] rt2x00usb_clear_entry+0x8f/0xa0
[11815.087560] [<c026b606>] rt2x00lib_rxdone+0x166/0x280
[11815.087560] [<c01678bb>] ? cache_free_debugcheck+0x26b/0x310
[11815.087560] [<c02707fc>] rt2x00usb_interrupt_rxdone+0x6c/0x70
[11815.087560] [<c0279821>] usb_hcd_giveback_urb+0x41/0xa0
[11815.087560] [<c0354972>] ? _spin_unlock+0x12/0x30
[11815.087560] [<c02878ec>] ehci_urb_done+0xbc/0xd0
[11815.087560] [<c0288184>] qh_completions+0x94/0x470
[11815.087560] [<c028a8ec>] ehci_work+0x8c/0x920
[11815.087560] [<c035494c>] ? _spin_unlock_irqrestore+0x2c/0x40
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c028c140>] ehci_irq+0x190/0x1a0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c02794a8>] usb_hcd_irq+0x28/0x70
[11815.087560] [<c0144a86>] handle_IRQ_event+0x36/0xd0
[11815.087560] [<c010623a>] ? mask_and_ack_8259A+0x5a/0xf0
[11815.087560] [<c01463eb>] handle_level_irq+0x6b/0xe0
[11815.087560] [<c0104c74>] handle_irq+0x34/0x60
[11815.087560] [<c0104819>] do_IRQ+0x39/0xa0
[11815.087560] [<c01678bb>] ? cache_free_debugcheck+0x26b/0x310
[11815.087560] [<c0110e60>] ? kernel_map_pages+0xf0/0x110
[11815.087560] [<c01033e9>] common_interrupt+0x29/0x30
[11815.087560] [<c02b007b>] ? reqsk_queue_alloc+0x2b/0xf0
[11815.087560] [<c0167ba2>] ? kmem_cache_free+0x52/0x80
[11815.087560] [<c02b2458>] __kfree_skb+0x38/0x90
[11815.087560] [<c02b250b>] kfree_skb+0x1b/0x40
[11815.087560] [<c03096d3>] packet_rcv_spkt+0x93/0xd0
[11815.087560] [<c02ba079>] dev_hard_start_xmit+0xf9/0x300
[11815.087560] [<c02c817d>] __qdisc_run+0x1ed/0x240
[11815.087560] [<c02ba6af>] dev_queue_xmit+0x30f/0x480
[11815.087560] [<c02d62ad>] ip_finish_output+0x17d/0x2a0
[11815.087560] [<c02d6432>] ip_output+0x62/0x80
[11815.087560] [<c02d3cbf>] ip_local_out+0x5f/0x70
[11815.087560] [<c02d5b73>] ip_queue_xmit+0x1c3/0x3b0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c0354903>] ? _spin_unlock_irq+0x13/0x30
[11815.087560] [<c02eba91>] ? tcp_v4_send_check+0x41/0xd0
[11815.087560] [<c02e7e0c>] tcp_transmit_skb+0x44c/0x6e0
[11815.087560] [<c02ea020>] tcp_write_xmit+0x1d0/0x9c0
[11815.087560] [<c0168ba3>] ? __kmalloc_track_caller+0xd3/0x160
[11815.087560] [<c02dd685>] ? sk_stream_alloc_skb+0x35/0xe0
[11815.087560] [<c02dd685>] ? sk_stream_alloc_skb+0x35/0xe0
[11815.087560] [<c02b333d>] ? __alloc_skb+0x4d/0x130
[11815.087560] [<c02ea891>] __tcp_push_pending_frames+0x31/0x90
[11815.087560] [<c02ddda4>] tcp_sendmsg+0x674/0x9f0
[11815.087560] [<c02aaaab>] sock_aio_write+0x11b/0x150
[11815.087560] [<c016b821>] do_sync_write+0xd1/0x110
[11815.087560] [<c023aeb3>] ? n_tty_read+0x2e3/0x710
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c0130fa0>] ? autoremove_wake_function+0x0/0x50
[11815.087560] [<c0138946>] ? getnstimeofday+0x56/0x110
[11815.087560] [<c02237e0>] ? copy_to_user+0x40/0x130
[11815.087560] [<c016c3d6>] vfs_write+0x136/0x140
[11815.087560] [<c0354903>] ? _spin_unlock_irq+0x13/0x30
[11815.087560] [<c016c49d>] sys_write+0x3d/0x70
[11815.087560] [<c0102e15>] syscall_call+0x7/0xb
[11815.087560] BUG: unable to handle kernel NULL pointer dereference at (null)
[11815.087560] IP: [<c0165e2a>] dma_pool_alloc+0x16a/0x2c0
[11815.087560] *pde = 00000000
[11815.087560] Oops: 0000 [#1] PREEMPT DEBUG_PAGEALLOC
[11815.087560] last sysfs file: /sys/devices/pci0000:00/0000:00:0b.0/usb4/4-1/4-1:1.1/bInterfacer
[11815.087560] Modules linked in:
[11815.087560]
[11815.087560] Pid: 1217, comm: sshd Not tainted (2.6.30-wl #6)
[11815.087560] EIP: 0060:[<c0165e2a>] EFLAGS: 00200002 CPU: 0
[11815.087560] EIP is at dma_pool_alloc+0x16a/0x2c0
[11815.087560] EAX: 00000000 EBX: cfbeef98 ECX: 00000000 EDX: 00000000
[11815.087560] ESI: 00000000 EDI: cd1e7780 EBP: cd1e7668 ESP: cd1e7610
[11815.087560] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068
[11815.087560] Process sshd (pid: 1217, ti=cd1e6000 task=cf228b80 task.ti=cd1e6000)
[11815.087560] Stack:
[11815.087560] 0004f328 00000000 cfbf6f70 00000000 cd1e7674 cfbf6f78 00200086 cfbf6fc8
[11815.087560] 00200082 00000000 00001832 01312d00 cd1e7684 cf228bac cd1e7668 cf228b80
[11815.087560] 00000001 274b0ce5 00000334 cfbe8df0 c0370d00 cd1e7780 cd1e7684 c02888ad
[11815.087560] Call Trace:
[11815.087560] [<c02888ad>] ? ehci_qtd_alloc+0x1d/0x70
[11815.087560] [<c028891a>] ? qh_urb_transaction+0x1a/0x3b0
[11815.087560] [<c013be6e>] ? tick_periodic+0x2e/0x80
[11815.087560] [<c013bed8>] ? tick_handle_periodic+0x18/0x90
[11815.087560] [<c028d3b7>] ? urb_free_priv+0x57/0x60
[11815.087560] [<c0289a09>] ? ehci_urb_enqueue+0x69/0xe40
[11815.087560] [<c0354986>] ? _spin_unlock+0x26/0x30
[11815.087560] [<c0146422>] ? handle_level_irq+0xa2/0xe0
[11815.087560] [<c0104c74>] ? handle_irq+0x34/0x60
[11815.087560] [<c0122480>] ? irq_exit+0x30/0x50
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c027a424>] ? usb_hcd_submit_urb+0x164/0x9a0
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c0110e60>] ? kernel_map_pages+0xf0/0x110
[11815.087560] [<c0167427>] ? cache_alloc_debugcheck_after+0x47/0x1e0
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c01072fc>] ? pit_read+0x7c/0xe0
[11815.087560] [<c0138946>] ? getnstimeofday+0x56/0x110
[11815.087560] [<c0138a11>] ? do_gettimeofday+0x11/0x40
[11815.087560] [<c027b02f>] ? usb_submit_urb+0xff/0x260
[11815.087560] [<c027077f>] ? rt2x00usb_clear_entry+0x8f/0xa0
[11815.087560] [<c026b606>] ? rt2x00lib_rxdone+0x166/0x280
[11815.087560] [<c01678bb>] ? cache_free_debugcheck+0x26b/0x310
[11815.087560] [<c02707fc>] ? rt2x00usb_interrupt_rxdone+0x6c/0x70
[11815.087560] [<c0279821>] ? usb_hcd_giveback_urb+0x41/0xa0
[11815.087560] [<c0354972>] ? _spin_unlock+0x12/0x30
[11815.087560] [<c02878ec>] ? ehci_urb_done+0xbc/0xd0
[11815.087560] [<c0288184>] ? qh_completions+0x94/0x470
[11815.087560] [<c028a8ec>] ? ehci_work+0x8c/0x920
[11815.087560] [<c035494c>] ? _spin_unlock_irqrestore+0x2c/0x40
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c028c140>] ? ehci_irq+0x190/0x1a0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c02794a8>] ? usb_hcd_irq+0x28/0x70
[11815.087560] [<c0144a86>] ? handle_IRQ_event+0x36/0xd0
[11815.087560] [<c010623a>] ? mask_and_ack_8259A+0x5a/0xf0
[11815.087560] [<c01463eb>] ? handle_level_irq+0x6b/0xe0
[11815.087560] [<c0104c74>] ? handle_irq+0x34/0x60
[11815.087560] [<c0104819>] ? do_IRQ+0x39/0xa0
[11815.087560] [<c01678bb>] ? cache_free_debugcheck+0x26b/0x310
[11815.087560] [<c0110e60>] ? kernel_map_pages+0xf0/0x110
[11815.087560] [<c01033e9>] ? common_interrupt+0x29/0x30
[11815.087560] [<c02b007b>] ? reqsk_queue_alloc+0x2b/0xf0
[11815.087560] [<c0167ba2>] ? kmem_cache_free+0x52/0x80
[11815.087560] [<c02b2458>] ? __kfree_skb+0x38/0x90
[11815.087560] [<c02b250b>] ? kfree_skb+0x1b/0x40
[11815.087560] [<c03096d3>] ? packet_rcv_spkt+0x93/0xd0
[11815.087560] [<c02ba079>] ? dev_hard_start_xmit+0xf9/0x300
[11815.087560] [<c02c817d>] ? __qdisc_run+0x1ed/0x240
[11815.087560] [<c02ba6af>] ? dev_queue_xmit+0x30f/0x480
[11815.087560] [<c02d62ad>] ? ip_finish_output+0x17d/0x2a0
[11815.087560] [<c02d6432>] ? ip_output+0x62/0x80
[11815.087560] [<c02d3cbf>] ? ip_local_out+0x5f/0x70
[11815.087560] [<c02d5b73>] ? ip_queue_xmit+0x1c3/0x3b0
[11815.087560] [<c011075b>] ? __change_page_attr_set_clr+0xbb/0x6d0
[11815.087560] [<c0354903>] ? _spin_unlock_irq+0x13/0x30
[11815.087560] [<c02eba91>] ? tcp_v4_send_check+0x41/0xd0
[11815.087560] [<c02e7e0c>] ? tcp_transmit_skb+0x44c/0x6e0
[11815.087560] [<c02ea020>] ? tcp_write_xmit+0x1d0/0x9c0
[11815.087560] [<c0168ba3>] ? __kmalloc_track_caller+0xd3/0x160
[11815.087560] [<c02dd685>] ? sk_stream_alloc_skb+0x35/0xe0
[11815.087560] [<c02dd685>] ? sk_stream_alloc_skb+0x35/0xe0
[11815.087560] [<c02b333d>] ? __alloc_skb+0x4d/0x130
[11815.087560] [<c02ea891>] ? __tcp_push_pending_frames+0x31/0x90
[11815.087560] [<c02ddda4>] ? tcp_sendmsg+0x674/0x9f0
[11815.087560] [<c02aaaab>] ? sock_aio_write+0x11b/0x150
[11815.087560] [<c016b821>] ? do_sync_write+0xd1/0x110
[11815.087560] [<c023aeb3>] ? n_tty_read+0x2e3/0x710
[11815.087560] [<c0354937>] ? _spin_unlock_irqrestore+0x17/0x40
[11815.087560] [<c0130fa0>] ? autoremove_wake_function+0x0/0x50
[11815.087560] [<c0138946>] ? getnstimeofday+0x56/0x110
[11815.087560] [<c02237e0>] ? copy_to_user+0x40/0x130
[11815.087560] [<c016c3d6>] ? vfs_write+0x136/0x140
[11815.087560] [<c0354903>] ? _spin_unlock_irq+0x13/0x30
[11815.087560] [<c016c49d>] ? sys_write+0x3d/0x70
[11815.087560] [<c0102e15>] ? syscall_call+0x7/0xb
[11815.087560] Code: 72 d2 8b 55 b0 8b 02 89 58 04 89 03 89 53 04 89 1a c7 43 10 00 00 00 00 c7
[11815.087560] EIP: [<c0165e2a>] dma_pool_alloc+0x16a/0x2c0 SS:ESP 0068:cd1e7610
[11815.087560] CR2: 0000000000000000
[11815.087560] ---[ end trace 4ac2fc2cf675d3cb ]---
[11815.087560] Kernel panic - not syncing: Fatal exception in interrupt
[11815.087560] Rebooting in 10 seconds..
[/codeybavidlz]