diff options
author | Eiichi Tsukata <[email protected]> | 2021-11-09 00:15:02 +0000 |
---|---|---|
committer | David S. Miller <[email protected]> | 2021-11-10 14:36:11 +0000 |
commit | c7cd82b90599fa10915f41e3dd9098a77d0aa7b6 (patch) | |
tree | ea5e3eb16b2a08584569f0c61e9e5ddac06fb301 /tools/perf/scripts/python/compaction-times.py | |
parent | bb7bbb6e36474933540c24ae1f1ad651b843981f (diff) |
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 <[email protected]>
Signed-off-by: Eiichi Tsukata <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/compaction-times.py')
0 files changed, 0 insertions, 0 deletions