diff options
author | Stefano Garzarella <sgarzare@redhat.com> | 2025-07-08 13:17:01 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2025-07-09 19:33:07 -0700 |
commit | 5d6fc6b4d0b2aee373dba41a25ede2651769ac48 (patch) | |
tree | 5f0edf217d857b38fd8b34b24bc560156ae792ed /drivers/usb/cdns3/cdnsp-debug.h | |
parent | b9274abe9803877ad36b28213d00eb414a9c0a95 (diff) |
vsock/test: fix test for null ptr deref when transport changes
In test_stream_transport_change_client(), the client sends CONTROL_CONTINUE
on each iteration, even when connect() is unsuccessful. This causes a flood
of control messages in the server that hangs around for more than 10
seconds after the test finishes, triggering several timeouts and causing
subsequent tests to fail. This was discovered in testing a newly proposed
test that failed in this way on the client side:
...
33 - SOCK_STREAM transport change null-ptr-deref...ok
34 - SOCK_STREAM ioctl(SIOCINQ) functionality...recv timed out
The CONTROL_CONTINUE message is used only to tell to the server to call
accept() to consume successful connections, so that subsequent connect()
will not fail for finding the queue full.
Send CONTROL_CONTINUE message only when the connect() has succeeded, or
found the queue full. Note that the second connect() can also succeed if
the first one was interrupted after sending the request.
Fixes: 3a764d93385c ("vsock/test: Add test for null ptr deref when transport changes")
Cc: leonardi@redhat.com
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Link: https://patch.msgid.link/20250708111701.129585-1-sgarzare@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/usb/cdns3/cdnsp-debug.h')
0 files changed, 0 insertions, 0 deletions