aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macsec.c
diff options
context:
space:
mode:
authorPeilin Ye <peilin.ye@bytedance.com>2022-08-08 11:05:25 -0700
committerDavid S. Miller <davem@davemloft.net>2022-08-10 09:50:18 +0100
commita3e7b29e30854ed67be0d17687e744ad0c769c4b (patch)
tree2dc887bf6b130804f3bbbba6136f0a8cc6ca52cb /drivers/net/macsec.c
parentvsock: Fix memory leak in vsock_connect() (diff)
downloadlinux-dev-a3e7b29e30854ed67be0d17687e744ad0c769c4b.tar.xz
linux-dev-a3e7b29e30854ed67be0d17687e744ad0c769c4b.zip
vsock: Set socket state back to SS_UNCONNECTED in vsock_connect_timeout()
Imagine two non-blocking vsock_connect() requests on the same socket. The first request schedules @connect_work, and after it times out, vsock_connect_timeout() sets *sock* state back to TCP_CLOSE, but keeps *socket* state as SS_CONNECTING. Later, the second request returns -EALREADY, meaning the socket "already has a pending connection in progress", even though the first request has already timed out. As suggested by Stefano, fix it by setting *socket* state back to SS_UNCONNECTED, so that the second request will return -ETIMEDOUT. Suggested-by: Stefano Garzarella <sgarzare@redhat.com> Fixes: d021c344051a ("VSOCK: Introduce VM Sockets") Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Peilin Ye <peilin.ye@bytedance.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions