staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
PATCH 1/1 staging: usbip: vhci_hcd: Fixed oops during removal of vhci_hcd
In response to "usbip detach -p [port_number]" user command,vhci_shoutdown_connection gets executed which kills tcp_tx,tcp_rx kernel threads and then vhci_device_reset resets all usb_device struct variables except kernel thread pointers.
so, at the time of vhci_hcd removal vhci_shoutdown_connection tries to kill kernel threads which are already killed.
--- drivers/staging/usbip/vhci_hcd.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/staging/usbip/vhci_hcd.c +2 -0
@@ -859,6 +859,8 @@ static void vhci_device_reset(struct usbip_device *ud)usb_put_dev (vdev->udev); vdev->udev =NULL ; + ud->tcp_rx =NULL ; + ud->tcp_tx =NULL ; ud->tcp_socket =NULL ; ud->status =VDEV_ST_NULL ;
Signature · 1 line
1.7.9.5
Quoted 7 lines · navin patidar
In response to "usbip detach -p [
port_number]" user command,vhci_shoutdown_connection gets executed which kills tcp_tx,tcp_rx kernel threads and thenvhci_device_resetresets allusb_devicestruct variables except kernel thread pointers.so, at the time of
vhci_hcdremovalvhci_shoutdown_connectiontries to kill kernel threads which are already killed.
Obviously, the same question would apply here. Why don't you do this in the shutdown function?
regards,
dan carpenter