dwc_otg: fix several potential crash sources
authorP33M <p33m@github.com>
Fri, 12 May 2017 11:24:00 +0000 (12:24 +0100)
committerRaspbian kernel package updater <root@raspbian.org>
Sat, 31 Mar 2018 14:54:12 +0000 (15:54 +0100)
commit9a65f6f71bf82f92d0282f8c8ff44246e370965f
tree16f7c6089b83b184a0f7beed99938bbe77cc2a9d
parentba8f05ef501b14cb98785e984f294b8bea4433fa
dwc_otg: fix several potential crash sources

On root port disconnect events, the host driver state is cleared and
in-progress host channels are forcibly stopped. This doesn't play
well with the FIQ running in the background, so:
- Guard the disconnect callback with both the host spinlock and FIQ
  spinlock
- Move qtd dereference in dwc_otg_handle_hc_fsm() after the early-out
  so we don't dereference a qtd that has gone away
- Turn catch-all BUG()s in dwc_otg_handle_hc_fsm() into warnings.
drivers/usb/host/dwc_otg/dwc_otg_cil_intr.c
drivers/usb/host/dwc_otg/dwc_otg_hcd.c
drivers/usb/host/dwc_otg/dwc_otg_hcd_intr.c