mirror of
https://github.com/torvalds/linux.git
synced 2024-11-29 15:41:36 +00:00
Merge branch 'vsock-remove-an-unused-variable-and-fix-infinite-sleep'
Dexuan Cui says: ==================== vsock: remove an unused variable and fix infinite sleep Patch 1 removes the unused 'wait' variable. Patch 2 fixes an infinite sleep issue reported by a hv_sock user. ==================== Link: https://lore.kernel.org/r/20221101021706.26152-1-decui@microsoft.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
commit
715aee0fde
@ -1905,8 +1905,11 @@ static int vsock_connectible_wait_data(struct sock *sk,
|
||||
err = 0;
|
||||
transport = vsk->transport;
|
||||
|
||||
while ((data = vsock_connectible_has_data(vsk)) == 0) {
|
||||
while (1) {
|
||||
prepare_to_wait(sk_sleep(sk), wait, TASK_INTERRUPTIBLE);
|
||||
data = vsock_connectible_has_data(vsk);
|
||||
if (data != 0)
|
||||
break;
|
||||
|
||||
if (sk->sk_err != 0 ||
|
||||
(sk->sk_shutdown & RCV_SHUTDOWN) ||
|
||||
@ -2092,8 +2095,6 @@ vsock_connectible_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
|
||||
const struct vsock_transport *transport;
|
||||
int err;
|
||||
|
||||
DEFINE_WAIT(wait);
|
||||
|
||||
sk = sock->sk;
|
||||
vsk = vsock_sk(sk);
|
||||
err = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user