OOPS when disconnecting usb key

From: Colin Leroy
Date: Thu Nov 18 2004 - 13:46:40 EST


Hi,

since 2.6.10-rc2, physically disconnecting an USB key (on which write
has been done) results in this:

usb 1-1: USB disconnect, address 5
target2:0:0: Illegal state transition <NULL>->cancel
Badness in scsi_device_set_state at drivers/scsi/scsi_lib.c:1717
Call trace:
[c000528c] check_bug_trap+0x98/0xdc
[c000547c] ProgramCheckException+0x1ac/0x268
[c0004a74] ret_from_except_full+0x0/0x4c
[c0166180] scsi_device_set_state+0xc0/0x14c
[c0160b3c] scsi_device_cancel+0x34/0x160
[c0160ca4] scsi_device_cancel_cb+0x18/0x28
[c0123a10] device_for_each_child+0x64/0xe4
[c0160cf8] scsi_host_cancel+0x44/0xc0
[c0160d98] scsi_remove_host+0x24/0x98
[ea1c40fc] storage_disconnect+0xa4/0x110 [usb_storage]
[e90152a0] usb_unbind_interface+0x94/0xd4 [usbcore]
[c0125030] device_release_driver+0x98/0x9c
[c0125204] bus_remove_device+0x7c/0x128
[c0123910] device_del+0xa8/0x114
[e901cb8c] usb_disable_device+0x8c/0x11c [usbcore]
Machine check in kernel mode.
Caused by (from SRR1=141000): Transfer error ack signal
Oops: machine check, sig: 7 [#1]
NIP: 0000FD58 LR: 000003A4 SP: E4CB5CD0 REGS: e4cb5c20 TRAP: 0200 Tainted: GF
MSR: 00141000 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 00
TASK = e71626c0[6291] 'khubd' THREAD: e4cb4000Last syscall: 120
GPR00: 00000102 E4CB5CD0 E71626C0 00000005 00030000 272A2000 7C053378 40000000
GPR08: A48100C0 00001032 40000000 24CB5CD0 C0160B50 10028814 E9030000 E7C792B8
GPR16: E4CB5F80 00000000 E7ED524C E7C792B8 00000000 00000000 E9030000 00000000
GPR24: 00000001 E71EF800 C0280000 00000000 00009032 DEF57280 E4CB5D98 0002FFF0
NIP [0000fd58] 0xfd58
LR [000003a4] 0x3a4
Call trace:
[c0160b3c] scsi_device_cancel+0x34/0x160
[c0160ca4] scsi_device_cancel_cb+0x18/0x28
[c0123a10] device_for_each_child+0x64/0xe4
[c0160cf8] scsi_host_cancel+0x44/0xc0
[c0160d98] scsi_remove_host+0x24/0x98
[ea1c40fc] storage_disconnect+0xa4/0x110 [usb_storage]
[e90152a0] usb_unbind_interface+0x94/0xd4 [usbcore]
[c0125030] device_release_driver+0x98/0x9c
[c0125204] bus_remove_device+0x7c/0x128
[c0123910] device_del+0xa8/0x114
[e901cb8c] usb_disable_device+0x8c/0x11c [usbcore]
[e9017940] usb_disconnect+0xcc/0x19c [usbcore]
[e901945c] hub_thread+0x990/0xcac [usbcore]
[c0006c8c] kernel_thread+0x44/0x60

I wonder whether it's due to this patchset:
http://linux.bkbits.net:8080/linux-2.5/cset@415eb179H41VOc0u6b4d_tSOe8BUeg
which adds a new way to reach the 'illegal' label.

However I did not try to back it out, I lack a bit time.
Removing the WARN_ON() in scsi_lib.c does not help.

Any idea.
--
Colin
http://colino.net/323/ - Presenting the Mazda 323 Rouge
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/