Patch "drivers/usb: Delete XHCI command timer if necessary" has been added to the 4.1-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drivers/usb: Delete XHCI command timer if necessary
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drivers-usb-delete-xhci-command-timer-if-necessary.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
ffe5adcb7661d94e952d6b5ed7f493cb4ef0c7bcMon Sep 17 00:00:00 2001
From: Gavin Shan <[email protected]>
Date: Mon, 3 Aug 2015 16:07:49 +0300
Subject: drivers/usb: Delete XHCI command timer if necessary
From: Gavin Shan <[email protected]>
commit ffe5adcb7661d94e952d6b5ed7f493cb4ef0c7bc upstream.
When xhci_mem_cleanup() is called, it's possible that the command timer isn't initialized and scheduled. For those cases, to delete the command timer causes soft-lockup as below stack dump shows.
The patch avoids deleting the command timer if it's not scheduled with the help of timer_pending().
NMI watchdog: BUG: soft lockup - CPU#40 stuck for 23s! [kworker/40:1:8140]
: NIP [c000000000150b30] lock_timer_base.isra.34+0x90/0xa0 LR [c000000000150c24] try_to_del_timer_sync+0x34/0xa0 Call Trace: [c000000f67c975e0] [c0000000015b84f8] mon_ops+0x0/0x8 (unreliable) [c000000f67c97620] [c000000000150c24] try_to_del_timer_sync+0x34/0xa0 [c000000f67c97660] [c000000000150cf0] del_timer_sync+0x60/0x80 [c000000f67c97690] [c00000000070ac0c] xhci_mem_cleanup+0x5c/0x5e0 [c000000f67c97740] [c00000000070c2e8] xhci_mem_init+0x1158/0x13b0 [c000000f67c97860] [c000000000700978] xhci_init+0x88/0x110 [c000000f67c978e0] [c000000000701644] xhci_gen_setup+0x2b4/0x590 [c000000f67c97970] [c0000000006d4410] xhci_pci_setup+0x40/0x190 [c000000f67c979f0] [c0000000006b1af8] usb_add_hcd+0x418/0xba0 [c000000f67c97ab0] [c0000000006cb15c] usb_hcd_pci_probe+0x1dc/0x5c0 [c000000f67c97b50] [c0000000006d3ba4] xhci_pci_probe+0x64/0x1f0 [c000000f67c97ba0] [c0000000004fe9ac] local_pci_probe+0x6c/0x130 [c000000f67c97c30] [c0000000000e5ce8] work_for_cpu_fn+0x38/0x60 [c000000f67c97c60] [c0000000000eacb8] process_one_work+0x198/0x470 [c000000f67c97cf0] [c0000000000eb6ac] worker_thread+0x37c/0x5a0 [c000000f67c97d80] [c0000000000f2730] kthread+0x110/0x130 [c000000f67c97e30] [c000000000009660] ret_from_kernel_thread+0x5c/0x7c
--- drivers/usb/host/xhci-mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/host/xhci-mem.c +2 -1
@@ -1792,7 +1792,8 @@ void xhci_mem_cleanup(struct xhci_hcd *xint size;int i, j, num_ports; -del_timer_sync (&xhci->cmd_timer); +if (timer_pending (&xhci->cmd_timer)) +del_timer_sync (&xhci->cmd_timer);/* Free the Event Ring Segment Table and the actual Event Ring */ size =sizeof (struct xhci_erst_entry )*(xhci->erst.num_entries);
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/drivers-usb-delete-xhci-command-timer-if-necessary.patch