]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-net: validate features during probe
authorJason Wang <jasowang@redhat.com>
Thu, 20 Nov 2014 09:03:05 +0000 (17:03 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 21 Nov 2014 05:26:43 +0000 (00:26 -0500)
commitfac4918a45e2869d1f90c350ce6900a68ea8a653
tree5695d9a2cffaa2d0772d573e8a273f1a4555206d
parent2f7b94531d8e046a75c1f29f36147997adce1c77
virtio-net: validate features during probe

We currently trigger BUG when VIRTIO_NET_F_CTRL_VQ
is not set but one of features depending on it is.
That's not a friendly way to report errors to
hypervisors.
Let's check, and fail probe instead.

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Wanlong Gao <gaowanlong@cn.fujitsu.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/virtio_net.c