virtio/vsock: WARN_ONCE() for invalid state of socket
authorArseniy Krasnov <avkrasnov@sberdevices.ru>
Tue, 28 Mar 2023 11:32:12 +0000 (14:32 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 30 Mar 2023 08:47:48 +0000 (10:47 +0200)
commitb8d2f61fdf2a566f7872158f35e65599aceb90fb
tree2933e84f77e16b64a8d77c0bdc8b76d7cc05eff6
parentf7154d967bc4ee25ea1572937550e711b2525474
virtio/vsock: WARN_ONCE() for invalid state of socket

This adds WARN_ONCE() and return from stream dequeue callback when
socket's queue is empty, but 'rx_bytes' still non-zero. This allows
the detection of potential bugs due to packet merging (see previous
patch).

Signed-off-by: Arseniy Krasnov <AVKrasnov@sberdevices.ru>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/vmw_vsock/virtio_transport_common.c