|
@@ -113,8 +113,8 @@ static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
|
|
|
|
|
|
spin_unlock(&sdev->ud.lock);
|
|
|
|
|
|
- sdev->ud.tcp_rx = kthread_run(stub_rx_loop, &sdev->ud, "stub_rx");
|
|
|
- sdev->ud.tcp_tx = kthread_run(stub_tx_loop, &sdev->ud, "stub_tx");
|
|
|
+ sdev->ud.tcp_rx = kthread_get_run(stub_rx_loop, &sdev->ud, "stub_rx");
|
|
|
+ sdev->ud.tcp_tx = kthread_get_run(stub_tx_loop, &sdev->ud, "stub_tx");
|
|
|
|
|
|
spin_lock(&sdev->ud.lock);
|
|
|
sdev->ud.status = SDEV_ST_USED;
|
|
@@ -187,10 +187,10 @@ 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);
|
|
|
+ if (ud->tcp_rx)
|
|
|
+ kthread_stop_put(ud->tcp_rx);
|
|
|
+ if (ud->tcp_tx)
|
|
|
+ kthread_stop_put(ud->tcp_tx);
|
|
|
|
|
|
/*
|
|
|
* 2. close the socket
|