8547d4cc2b
When unbinding a device on the host which was still attached on the client, I got a NULL pointer dereference on the client. This turned out to be due to kthread_stop() being called on an already dead kthread. Here is how I was able to reproduce the problem: server:# usbip bind -b 1-2 client:# usbip attach -h server -b 1-2 server:# usbip unbind -b 1-2 This patch fixes the problem by checking the kthread before attempting to kill it, as it is done on the opposite side in stub_shutdown_connection(). Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
||
---|---|---|
.. | ||
userspace | ||
Kconfig | ||
Makefile | ||
README | ||
stub_dev.c | ||
stub_main.c | ||
stub_rx.c | ||
stub_tx.c | ||
stub.h | ||
usbip_common.c | ||
usbip_common.h | ||
usbip_event.c | ||
vhci_hcd.c | ||
vhci_rx.c | ||
vhci_sysfs.c | ||
vhci_tx.c | ||
vhci.h |
TODO: - more discussion about the protocol - testing - review of the userspace interface - document the protocol Please send patches for this code to Greg Kroah-Hartman <greg@kroah.com>