Commit 715aee0f authored by Paolo Abeni's avatar Paolo Abeni

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.comSigned-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parents 768b3c74 466a8533
...@@ -1905,8 +1905,11 @@ static int vsock_connectible_wait_data(struct sock *sk, ...@@ -1905,8 +1905,11 @@ static int vsock_connectible_wait_data(struct sock *sk,
err = 0; err = 0;
transport = vsk->transport; transport = vsk->transport;
while ((data = vsock_connectible_has_data(vsk)) == 0) { while (1) {
prepare_to_wait(sk_sleep(sk), wait, TASK_INTERRUPTIBLE); prepare_to_wait(sk_sleep(sk), wait, TASK_INTERRUPTIBLE);
data = vsock_connectible_has_data(vsk);
if (data != 0)
break;
if (sk->sk_err != 0 || if (sk->sk_err != 0 ||
(sk->sk_shutdown & RCV_SHUTDOWN) || (sk->sk_shutdown & RCV_SHUTDOWN) ||
...@@ -2092,8 +2095,6 @@ vsock_connectible_recvmsg(struct socket *sock, struct msghdr *msg, size_t len, ...@@ -2092,8 +2095,6 @@ vsock_connectible_recvmsg(struct socket *sock, struct msghdr *msg, size_t len,
const struct vsock_transport *transport; const struct vsock_transport *transport;
int err; int err;
DEFINE_WAIT(wait);
sk = sock->sk; sk = sock->sk;
vsk = vsock_sk(sk); vsk = vsock_sk(sk);
err = 0; err = 0;
......
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