]> git.baikalelectronics.ru Git - kernel.git/commit
vsock/virtio: add WARN_ON check on virtio_transport_get_ops()
authorStefano Garzarella <sgarzare@redhat.com>
Fri, 13 Dec 2019 18:48:01 +0000 (19:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 17 Dec 2019 00:07:12 +0000 (16:07 -0800)
commit9f69d50b628f0f6547f4e2e9233fd48224e2e530
tree71f53483981f7cc654caa9f87234893e5746c284
parent389f3b74f24c9acd9c12d2b78c4ce9f8408bcfed
vsock/virtio: add WARN_ON check on virtio_transport_get_ops()

virtio_transport_get_ops() and virtio_transport_send_pkt_info()
can only be used on connecting/connected sockets, since a socket
assigned to a transport is required.

This patch adds a WARN_ON() on virtio_transport_get_ops() to check
this requirement, a comment and a returned error on
virtio_transport_send_pkt_info(),

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/vmw_vsock/virtio_transport_common.c