Bug 155541 - panic: BUG at usb_hc_died+0x16 when unplugging usb-c dock
Summary: panic: BUG at usb_hc_died+0x16 when unplugging usb-c dock
Status: RESOLVED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: USB (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Greg Kroah-Hartman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 19:57 UTC by Richard van der Hoff
Modified: 2018-12-21 09:04 UTC (History)
1 user (show)

See Also:
Kernel Version: 4.7
Subsystem:
Regression: No
Bisected commit-id:


Attachments
stack trace (2.57 KB, text/plain)
2016-08-29 20:00 UTC, Richard van der Hoff
Details
lspci -vv without dock present (34.09 KB, text/plain)
2016-08-29 20:02 UTC, Richard van der Hoff
Details
lspci -vv after hotplug (15.02 KB, text/plain)
2016-08-29 20:03 UTC, Richard van der Hoff
Details

Description Richard van der Hoff 2016-08-29 19:57:24 UTC
I have a USB-3.1 dock; sometimes I see a kernel panic when I unplug it. The panic hangs the entire system (and strangely does not appear to be reproducible at a text console).

The start of the panic, as captured over a serial console, is as follows:

[   44.010232] BUG: unable to handle kernel NULL pointer dereference at           (null)
[   44.010274] IP: [<ffffffff81630316>] usb_hc_died+0x16/0xc0
[   44.010292] PGD 0 
[   44.010300] Oops: 0000 [#1] SMP
[   44.010310] Modules linked in: xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4

It appears that the first unplug is successful; the second one normally triggers a crash.

The situation is complicated by the fact that this USB bridge is behind a chain of PCI bridges, which appear to power down when nothing is plugged into the USB-C port.
Comment 1 Richard van der Hoff 2016-08-29 20:00:48 UTC
Created attachment 231301 [details]
stack trace

I captured a dump via kdump; this is the result of 'bt' from 'crash'.
Comment 2 Richard van der Hoff 2016-08-29 20:02:51 UTC
Created attachment 231311 [details]
lspci -vv without dock present
Comment 3 Richard van der Hoff 2016-08-29 20:03:18 UTC
Created attachment 231321 [details]
lspci -vv after hotplug
Comment 4 Greg Kroah-Hartman 2016-08-30 05:28:37 UTC
On Mon, Aug 29, 2016 at 07:57:24PM +0000, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=155541
> 
>             Bug ID: 155541
>            Summary: panic: BUG at usb_hc_died+0x16 when unplugging usb-c
>                     dock

All USB bugs should be sent to the linux-usb@vger.kernel.org mailing
list, and not entered into bugzilla.  Please bring this issue up there,
if it is still a problem in the latest kernel release.
Comment 5 Richard van der Hoff 2018-12-21 09:04:55 UTC
For the record, this got fixed by commit bcf42aa60c28 in kernel 4.9.

Note You need to log in before you can comment on or make changes to this bug.