]> asedeno.scripts.mit.edu Git - linux.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)
commit4aaf596148f4b518244cf2b02fafc53ad586dd6b
tree71f53483981f7cc654caa9f87234893e5746c284
parentdf18fa14629ae3ae10f51577642113ccc8ce87d1
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