diff options
| author | Nguyen Dinh Phi <phind.uet@gmail.com> | 2026-08-14 01:30:20 +0800 |
|---|---|---|
| committer | Paolo Abeni <pabeni@redhat.com> | 2026-08-18 14:58:53 +0200 |
| commit | 96cbf89993091a163bfedec52a3bd683dc94b3b4 (patch) | |
| tree | d0b5f65a3f36aa9665c563c6c0058a3c8cd08f96 /tools/perf/scripts/python/flamegraph.py | |
| parent | 81fc0f369637ed6ee615d089d3016ba88b2bab71 (diff) | |
vsock: use sock_error() to consume sk_err after a failed connect
vsock_connect() returns sk_err to userspace but does not clear it:
if (sk->sk_err) {
err = -sk->sk_err;
For a blocking connect() the error has already been delivered as
connect()'s return value, so leaving it set causes subsequent operations
like poll()/epoll() to keep reporting POLLERR even though the connect
failure was already delivered.
The error should be consumed once it has been returned to userspace.
Switch to sock_error(), which reads and clears sk_err atomically,
matching the behavior of other protocol implementations such as
__inet_stream_connect().
Fixes: d021c344051a ("VSOCK: Introduce VM Sockets")
Tested-by: Wupeng Ma <mawupeng1@huawei.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Nguyen Dinh Phi <phind.uet@gmail.com>
Link: https://patch.msgid.link/20260813173024.2362935-4-phind.uet@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions
