Commit a2bc47c
xhci: Fix null pointer dereference when host dies
Make sure xhci_free_dev() and xhci_kill_endpoint_urbs() do not race
and cause null pointer dereference when host suddenly dies.
Usb core may call xhci_free_dev() which frees the xhci->devs[slot_id]
virt device at the same time that xhci_kill_endpoint_urbs() tries to
loop through all the device's endpoints, checking if there are any
cancelled urbs left to give back.
hold the xhci spinlock while freeing the virt device
Cc: [email protected]
Signed-off-by: Mathias Nyman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>1 parent e8fb5bc commit a2bc47c
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3974 | 3974 | | |
3975 | 3975 | | |
3976 | 3976 | | |
| 3977 | + | |
3977 | 3978 | | |
3978 | 3979 | | |
3979 | 3980 | | |
| |||
4000 | 4001 | | |
4001 | 4002 | | |
4002 | 4003 | | |
| 4004 | + | |
| 4005 | + | |
4003 | 4006 | | |
| 4007 | + | |
| 4008 | + | |
4004 | 4009 | | |
4005 | 4010 | | |
4006 | 4011 | | |
| |||
0 commit comments