navin
cbf7d122cc
staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
In response to "usbip detach -p [port_number]" user command,vhci_shutdown_connection() gets
executed which kills tcp_tx,tcp_rx kernel threads but doesn't set thread pointers to NULL.
so, at the time of vhci_hcd removal vhci_shutdown_connection() again tries to kill kernel
threads which are already killed.
[ 312.220259] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 312.220313] IP: [<ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.220349] PGD 5b7be067 PUD 5b7dc067 PMD 0
[ 312.220388] Oops: 0000 [#1] SMP
[ 312.220415] Modules linked in: vhci_hcd(O-) usbip_host(O) usbip_core(O) uas usb_storage joydev parport_pc bnep rfcomm ppdev binfmt_misc
snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi arc4 snd_rawmidi snd_seq_midi_event snd_seq
ath9k mac80211 ath9k_common ath9k_hw snd_timer snd_seq_device snd ath i915 drm_kms_helper drm psmouse cfg80211 coretemp soundcore lpc_ich i2c_algo_bit
snd_page_alloc video intel_ips wmi btusb mac_hid bluetooth ideapad_laptop lp sparse_keymap serio_raw mei microcode parport r8169
[ 312.220862] CPU 0
[ 312.220882] Pid: 2095, comm: usbip_eh Tainted: G O 3.6.0-rc3+ #2 LENOVO 20042 /Base Board Product Name
[ 312.220938] RIP: 0010:[<ffffffff8108186f>] [<ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.220979] RSP: 0018:ffff88004d6ebdb0 EFLAGS: 00010282
[ 312.221008] RAX: 0000000000000000 RBX: ffff880041c4db40 RCX: ffff88005ad52230
[ 312.221041] RDX: 0000000000000034 RSI: 0000000000000286 RDI: 0000000000000000
[ 312.221074] RBP: ffff88004d6ebdc0 R08: ffff88004d6ea000 R09: 0000000000000000
[ 312.221107] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000000000
[ 312.221144] R13: 0000000000000000 R14: ffff88005ad521d8 R15: ffff88004d6ebea0
[ 312.221177] FS: 0000000000000000(0000) GS:ffff880077400000(0000) knlGS:0000000000000000
[ 312.221214] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 312.221241] CR2: 0000000000000000 CR3: 000000005b7b9000 CR4: 00000000000007f0
[ 312.221277] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 312.221309] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 312.221342] Process usbip_eh (pid: 2095, threadinfo ffff88004d6ea000, task ffff88004d44db40)
[ 312.221384] Stack:
[ 312.221396] ffff88004d6ebdc0 ffff880041c4db40 ffff88004d6ebde0 ffffffff81052aaa
[ 312.221442] ffff880041c4db40 0000000000000000 ffff88004d6ebe10 ffffffff8107a148
[ 312.221487] ffff88005ad521f0 ffff88005ad52228 ffff88004d44db40 ffff88005ad521d8
[ 312.221536] Call Trace:
[ 312.221556] [<ffffffff81052aaa>] __put_task_struct+0x4a/0x140
[ 312.221587] [<ffffffff8107a148>] kthread_stop+0x108/0x110
[ 312.221616] [<ffffffffa0412569>] vhci_shutdown_connection+0x49/0x2b4 [vhci_hcd]
[ 312.221657] [<ffffffffa0139920>] event_handler_loop+0x70/0x140 [usbip_core]
[ 312.221692] [<ffffffff8107ad30>] ? add_wait_queue+0x60/0x60
[ 312.221721] [<ffffffffa01398b0>] ? usbip_stop_eh+0x30/0x30 [usbip_core]
[ 312.221754] [<ffffffff8107a453>] kthread+0x93/0xa0
[ 312.221784] [<ffffffff81670e84>] kernel_thread_helper+0x4/0x10
[ 312.221814] [<ffffffff8107a3c0>] ? flush_kthread_worker+0xb0/0xb0
[ 312.223589] [<ffffffff81670e80>] ? gs_change+0x13/0x13
[ 312.225360] Code: 0b 0f 0b 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 53 48 83 ec 08 66 66 66 66 90 48 8b 87 58 04 00 00 48 89 fb 48 8b bf 50 04 00 00
<8b> 00 48 c7 83 50 04 00 00 00 00 00 00 f0 ff 0f 0f 94 c0 84 c0
[ 312.229663] RIP [<ffffffff8108186f>] exit_creds+0x1f/0x70
[ 312.231696] RSP <ffff88004d6ebdb0>
[ 312.233648] CR2: 0000000000000000
[ 312.256464] ---[ end trace 1971ce612a167279 ]---
Signed-off-by: navin patidar <navinp@cdac.in>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-21 08:56:40 -07:00
..
2012-09-14 20:54:44 +02:00
2012-07-27 15:14:26 -07:00
2012-09-13 00:24:29 -04:00
2012-08-06 13:29:57 -07:00
2012-08-28 21:01:01 +02:00
2012-08-02 13:51:46 -04:00
2012-08-25 11:36:43 -07:00
2012-08-27 08:36:42 -05:00
2012-08-17 09:21:35 +02:00
2012-07-30 17:25:13 -07:00
2012-08-21 16:45:02 -07:00
2012-07-16 23:23:52 -07:00
2012-08-23 17:02:42 +02:00
2012-08-17 19:37:08 +02:00
2012-09-12 07:14:17 +08:00
2012-08-13 10:15:22 +05:30
2012-07-29 21:11:05 -03:00
2012-09-16 13:22:21 -07:00
2012-07-30 09:32:39 -07:00
2012-07-31 19:07:42 -07:00
2012-09-01 12:52:24 +02:00
2012-09-14 15:45:01 +10:00
2012-09-16 17:17:25 -07:00
2012-07-31 19:07:42 -07:00
2012-09-12 06:42:11 -07:00
2012-09-14 17:55:57 -07:00
2012-08-21 14:54:42 -07:00
2012-08-17 19:37:14 +02:00
2012-07-12 07:54:45 -07:00
2012-09-17 14:42:54 -07:00
2012-08-16 09:38:39 -07:00
2012-09-08 16:20:59 -07:00
2012-08-10 11:34:08 +02:00
2012-09-13 14:58:54 -04:00
2012-08-13 14:34:02 +08:00
2012-08-18 09:51:42 +10:00
2012-08-21 16:54:38 -07:00
2012-07-30 17:25:17 -07:00
2012-09-16 13:22:21 -07:00
2012-08-21 16:45:03 -07:00
2012-09-04 13:58:11 -04:00
2012-09-04 09:40:26 +03:00
2012-09-13 16:37:52 -04:00
2012-07-09 16:42:24 -04:00
2012-08-20 02:16:00 -07:00
2012-07-24 16:17:07 -07:00
2012-08-23 10:53:08 -06:00
2012-07-27 15:14:26 -07:00
2012-08-17 11:09:58 +02:00
2012-09-13 16:46:31 -04:00
2012-08-02 11:52:39 -07:00
2012-07-30 17:25:21 -07:00
2012-09-10 17:04:38 +02:00
2012-08-21 16:45:03 -07:00
2012-09-16 13:22:21 -07:00
2012-07-26 16:19:08 -07:00
2012-07-26 16:19:08 -07:00
2012-08-27 17:07:37 -07:00
2012-08-28 10:08:31 +02:00
2012-08-22 09:42:54 +04:00
2012-08-09 13:21:05 +09:00
2012-08-25 11:45:04 -07:00
2012-09-21 08:56:40 -07:00
2012-09-07 11:32:54 -07:00
2012-07-31 18:08:25 -07:00
2012-09-05 12:44:44 -07:00
2012-09-12 11:12:31 -07:00
2012-08-22 10:26:42 -04:00
2012-08-20 14:52:11 -07:00
2012-08-23 12:37:22 +00:00
2012-07-20 08:59:03 +01:00
2012-07-19 15:39:39 -07:00
2012-08-16 12:33:59 -07:00
2012-08-29 17:13:06 +02:00
2012-09-06 09:22:02 -04:00
2012-07-15 19:56:38 +02:00
2012-07-31 08:16:22 -06:00
2012-07-31 08:16:22 -06:00