Hi Jorgen,
virtio-vsock doesn't use vsock_pending_work() but I may have spotted a
problem that affects the VMCI transport. I'm not sending a patch
because I can't test it.
1. During vsock_accept() listener->sk_ack_backlog is decremented.
2. vsock_pending_work() will decrement listener->sk_ack_backlog again if
vsk->rejected.
The result is that sk_ack_backlog can be invalid. It only happens in
the case where the listener socket has an error. Maybe in practice it's
not a problem because the server application will close the listener
socket if there is an error...
Stefan
Hi Stefan,
Good catch. Thanks for pointing this out. I'll take care of fixing and testing this.
Thanks,
Jørgen
________________________________________
From: Stefan Hajnoczi <stefanha@redhat.com>
Sent: Thursday, June 23, 2016 5:40 PM
To: Jorgen S. Hansen
Cc: netdev@vger.kernel.org
Subject: vmw_vsock sk_ack_backlog double decrement bug
Hi Jorgen,
virtio-vsock doesn't use vsock_pending_work() but I may have spotted a
problem that affects the VMCI transport. I'm not sending a patch
because I can't test it.
1. During vsock_accept() listener->sk_ack_backlog is decremented.
2. vsock_pending_work() will decrement listener->sk_ack_backlog again if
vsk->rejected.
The result is that sk_ack_backlog can be invalid. It only happens in
the case where the listener socket has an error. Maybe in practice it's
not a problem because the server application will close the listener
socket if there is an error...
Stefan