change in xhci result in soft lockup

From: Kui Zhang
Date: Sat Aug 06 2016 - 17:58:33 EST


Hello

After this patch

# first bad commit: [86065c2719a5685cef36945f09def3f0658c7860] xhci:
don't rely on precalculated value of needed trbs in the enqueue loop


My system would hang while installing android packages over USB

adb install -r VLC-Android-2.1.0-ARMv7.apk


Log:

Aug 01 01:49:17 kernel: CPU: 3 PID: 174 Comm: kworker/3:1 Tainted: P
O 4.7.0+ #12
Aug 01 01:49:17 kernel: Hardware name: Notebook
P15SM-A/SM1-A /P15SM-A/SM1-A ,
BIOS 4.6.5 04/20/2015
Aug 01 01:49:17 kernel: Workqueue: events
pkg_temp_thermal_threshold_work_fn [x86_pkg_temp_thermal]
Aug 01 01:49:17 kernel: task: ffff880222fac600 task.stack: ffff880222814000
Aug 01 01:49:17 kernel: RIP: 0010:[<ffffffff98175194>]
[<ffffffff98175194>] smp_call_function_single+0xd4/0x130
Aug 01 01:49:17 kernel: RSP: 0018:ffff880222817cb0 EFLAGS: 00000202
Aug 01 01:49:17 kernel: RAX: 0000000000000000 RBX: 0000000000000000
RCX: 0000000000000830
Aug 01 01:49:17 kernel: RDX: 0000000000000003 RSI: 00000000000000fb
RDI: 0000000000000001
Aug 01 01:49:17 kernel: RBP: ffff880222817cf8 R08: ffff88022fad7940
R09: 0000000000000000
Aug 01 01:49:17 kernel: R10: 0000000000000000 R11: 0000000000000000
R12: ffffffff985162f0
Aug 01 01:49:17 kernel: R13: ffff8802258624c0 R14: ffff880222817dd4
R15: ffff88022fad94c0
Aug 01 01:49:17 kernel: FS: 0000000000000000(0000)
GS:ffff88022fac0000(0000) knlGS:0000000000000000
Aug 01 01:49:17 kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Aug 01 01:49:17 kernel: CR2: 00002a6d3e049000 CR3: 000000003b206000
CR4: 00000000001406e0
Aug 01 01:49:17 kernel: DR0: 0000000000000000 DR1: 0000000000000000
DR2: 0000000000000000
Aug 01 01:49:17 kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0
DR7: 0000000000000400
Aug 01 01:49:17 kernel: Stack:
Aug 01 01:49:17 kernel: ffff880222817cf0 ffffffff981259d5
0000000000000000 ffffffff985162f0
Aug 01 01:49:17 kernel: ffff880222817d08 0000000000000003
00000000cb48f97b ffff880222817d54
Aug 01 01:49:17 kernel: ffff880222817d50 ffff880222817d40
ffffffff98515ead 00000000000001b1
Aug 01 01:49:17 kernel: Call Trace:
Aug 01 01:49:17 kernel: [<ffffffff981259d5>] ? update_curr+0xf5/0x170
Aug 01 01:49:17 kernel: [<ffffffff985162f0>] ?
wrmsr_safe_regs_on_cpu+0x60/0x60
Aug 01 01:49:17 kernel: [<ffffffff98515ead>] rdmsr_on_cpu+0x5d/0x90
Aug 01 01:49:17 kernel: [<ffffffffc0d000f8>]
sys_get_curr_temp+0x48/0xb0 [x86_pkg_temp_thermal]
Aug 01 01:49:17 kernel: [<ffffffff98866a28>] thermal_zone_get_temp+0x78/0x120
Aug 01 01:49:17 kernel: [<ffffffff9812e1ca>] ? pick_next_task_fair+0x10a/0x4c0
Aug 01 01:49:17 kernel: [<ffffffff98868803>]
thermal_zone_device_update+0x43/0x1a0
Aug 01 01:49:17 kernel: [<ffffffffc0d00cd7>]
pkg_temp_thermal_threshold_work_fn+0x1a7/0x214 [x86_pkg_temp_thermal]
Aug 01 01:49:17 kernel: [<ffffffff9810a38b>] process_one_work+0x14b/0x400
Aug 01 01:49:17 kernel: [<ffffffff9810a9cb>] worker_thread+0x4b/0x480
Aug 01 01:49:17 kernel: [<ffffffff9810a980>] ? rescuer_thread+0x340/0x340
Aug 01 01:49:17 kernel: [<ffffffff9810a980>] ? rescuer_thread+0x340/0x340
Aug 01 01:49:17 kernel: [<ffffffff9810fb38>] kthread+0xd8/0xf0
Aug 01 01:49:17 kernel: [<ffffffff98a3347f>] ret_from_fork+0x1f/0x40
Aug 01 01:49:17 kernel: [<ffffffff9810fa60>] ? kthread_park+0x60/0x60
Aug 01 01:49:17 kernel: Code: 00 00 75 70 48 83 c4 38 5b 41 5c 5d c3
48 8d 75 c8 48 89 d1 89 df 4c 89 e2 e8 39 fe ff ff 8b 55 e0 83 e2 01
74 0a f3 90 8b 55 e0 <83> e2
Aug 01 01:49:17 kernel: ata4.00: exception Emask 0x0 SAct 0x0 SErr
0x0 action 0x6 frozen
Aug 01 01:49:17 kernel: ata4.00: cmd
a0/00:00:00:08:00/00:00:00:00:00/a0 tag 28 pio 16392 in
Get event status notification 4a 01
00 00 10 00 00 00 08 00res 40/00:01:00:00:02/00:00:00:00:00/00 Emask
0x4 (timeout)
Aug 01 01:49:17 kernel: ata4.00: status: { DRDY }
Aug 01 01:49:17 kernel: ata4: hard resetting link
Aug 01 01:49:17 kernel: ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
Aug 01 01:49:17 kernel: sd 0:0:0:0: [sda] tag#12 FAILED Result:
hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
Aug 01 01:49:17 kernel: sd 0:0:0:0: [sda] tag#12 CDB: Read(10) 28 00
05 9a c2 d0 00 01 00 00
Aug 01 01:49:17 kernel: blk_update_request: I/O error, dev sda, sector 94028496
Aug 01 01:49:17 kernel: sd 0:0:0:0: [sda] tag#11 FAILED Result:
hostbyte=DID_OK driverbyte=DRIVER_TIMEOUT
Aug 01 01:49:17 kernel: sd 0:0:0:0: [sda] tag#11 CDB: Read(10) 28 00
05 9a c1 d0 00 01 00 00
Aug 01 01:49:17 kernel: blk_update_request: I/O error, dev sda, sector 94028240
Aug 01 01:49:17 kernel: ata4.00: configured for UDMA/133
Aug 01 01:49:17 kernel: ata4: EH complete
Aug 01 01:49:17 kernel: NMI watchdog: BUG: soft lockup - CPU#3 stuck
for 22s! [kworker/3:1:174]




Thanks
Kui.Z