Commit 2f8c4c54 authored by Arjan Mels's avatar Arjan Mels Committed by Greg Kroah-Hartman

staging: usbip: fix shutdown problems.

When shuting down the tcp_rx and tcp_tx threads first check if they are
not closed already (maybe because an error caused them to return).
Signed-off-by: default avatarArjan Mels <arjan.mels@gmx.net>
Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>
Cc: Max Vozeler <max@vozeler.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c996edcf
......@@ -220,7 +220,9 @@ static void stub_shutdown_connection(struct usbip_device *ud)
}
/* 1. stop threads */
if (ud->tcp_rx && !task_is_dead(ud->tcp_rx))
kthread_stop(ud->tcp_rx);
if (ud->tcp_tx && !task_is_dead(ud->tcp_tx))
kthread_stop(ud->tcp_tx);
/* 2. close the socket */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment