Home
last modified time | relevance | path

Searched hist:c7cd82b9 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/net/vmw_vsock/
H A Daf_vsock.cc7cd82b9 Mon Nov 08 18:15:02 CST 2021 Eiichi Tsukata <eiichi.tsukata@nutanix.com> vsock: prevent unnecessary refcnt inc for nonblocking connect

Currently vosck_connect() increments sock refcount for nonblocking
socket each time it's called, which can lead to memory leak if
it's called multiple times because connect timeout function decrements
sock refcount only once.

Fixes it by making vsock_connect() return -EALREADY immediately when
sock state is already SS_CONNECTING.

Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Eiichi Tsukata <eiichi.tsukata@nutanix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>