projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c996edc
)
staging: usbip: fix shutdown problems.
author
Arjan Mels
<
[email protected]
>
Tue, 5 Apr 2011 18:24:56 +0000
(20:24 +0200)
committer
Greg Kroah-Hartman
<
[email protected]
>
Wed, 6 Apr 2011 22:51:13 +0000
(15:51 -0700)
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: Arjan Mels <
[email protected]
>
Cc: Takahiro Hirofuchi <
[email protected]
>
Cc: Max Vozeler <
[email protected]
>
Cc: Arnd Bergmann <
[email protected]
>
Cc: stable <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/staging/usbip/stub_dev.c
patch
|
blob
|
history
diff --git
a/drivers/staging/usbip/stub_dev.c
b/drivers/staging/usbip/stub_dev.c
index 8214c353d9f5224921c9d6d6962c4b31f2a979ff..bce7d039346c264cadfbee4d8d917678ed957f75 100644
(file)
--- a/
drivers/staging/usbip/stub_dev.c
+++ b/
drivers/staging/usbip/stub_dev.c
@@
-220,8
+220,10
@@
static void stub_shutdown_connection(struct usbip_device *ud)
}
/* 1. stop threads */
- kthread_stop(ud->tcp_rx);
- kthread_stop(ud->tcp_tx);
+ 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 */
/*