It's really wrong!
In addition I was playing a little bit more and got more useful information.
First, CONFIG_PREEMPT should be enabled, because without, the oops seems to be reported at the wrong position!! (no idea why ...)
Wrong, or just different? Preempt could matter just because it changes the timing, which can matter a lot on SMP.
it was reported at 0x00001024 <qh_completions+353>: test %eax,%eax but the real position is 0x0000103e <qh_completions+379>: mov %edx,0x4(%eax)
(Taken from the dump w/o preempt. The relative position is, of course, different in the code w/ preempt.)
I moved the unlock and I still get the "double list_del... "messages. But now only once. Previously the message got repeated several times (up to 40 times).Try this: move the spin_unlock(&urb->lock) so it's AFTER the call to list_del(). There's actually a subtle assumption there, on SMP systems I think it could cause the double-delete problem you showed.
Also try bypassing preempt by using _raw_spin_*lock(&urb->lock), and see if that matters. My guess: if you moved the unlock, nothing will change
With _raw_spin_*lock(&urb->lock) the behaviour is identical to the behaviour with spin_*lock and the unlock at it's original position, regardless of the position of the _raw_spin_unlock.
--------------
I also tried to get some more information about the list:
if (qtd->qtd_list.prev != LIST_POISON2 && qtd->qtd_list.next != LIST_POISON1) {
pr = qtd->qtd_list.prev;
ne = qtd->qtd_list.next;
list_del (&qtd->qtd_list);
pr2 = qtd->qtd_list.prev;
ne2 = qtd->qtd_list.next;
} else {
printk("double list_del %x %x %x %x %x %x %x \n",qtd->qtd_list,qtd->qtd_list.prev,qtd->qtd_list.next, pr, ne, pr2, ne2);
}
and the messages look like this
Apr 19 18:44:47 kernel: double list_del 100100 200200 200200 100100 dd8e714c e5c88878 200200 Apr 19 18:47:57 kernel: double list_del 100100 200200 200200 100100 dd8e714c e5c88758 200200
with the value of qtd->qtd_list.next before the "fatal" list_del being always the same (dd8e714c in this case) (if I didn't make a logical mistake here...)
Andreas
- Dave
The right position is:
list_del (&qtd->qtd_list);
...
Apr 19 15:28:52 kernel: double list_del 100100 200200 200200
Apr 19 15:28:52 kernel: ehci_hcd 0000:01:06.2: dma_pool_free ehci_qtd, f797d540/a7a7a7a7 (bad dma)
Apr 19 15:28:52 kernel: double list_del 100100 200200 200200
Apr 19 15:28:52 kernel: ehci_hcd 0000:01:06.2: dma_pool_free ehci_qtd, f797d5a0/a7a7a7a7 (bad dma)
------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel