Skip to content
Snippets Groups Projects
Commit 99d2fa2d authored by Ye Bin's avatar Ye Bin Committed by Greg Kroah-Hartman
Browse files

usbip: vudc: fix missing unlock on error in usbip_sockfd_store()


[ Upstream commit 1d08ed58 ]

Add the missing unlock before return from function usbip_sockfd_store()
in the error handling case.

Fixes: bd8b8204 ("usbip: vudc synchronize sysfs code paths")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Acked-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Link: https://lore.kernel.org/r/20210408112305.1022247-1-yebin10@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 99a29899
No related branches found
No related tags found
No related merge requests found
......@@ -156,12 +156,14 @@ static ssize_t usbip_sockfd_store(struct device *dev,
tcp_rx = kthread_create(&v_rx_loop, &udc->ud, "vudc_rx");
if (IS_ERR(tcp_rx)) {
sockfd_put(socket);
mutex_unlock(&udc->ud.sysfs_lock);
return -EINVAL;
}
tcp_tx = kthread_create(&v_tx_loop, &udc->ud, "vudc_tx");
if (IS_ERR(tcp_tx)) {
kthread_stop(tcp_rx);
sockfd_put(socket);
mutex_unlock(&udc->ud.sysfs_lock);
return -EINVAL;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment