virtio: check virtqueue parameter when detaching
authorBernard Iremonger <bernard.iremonger@intel.com>
Wed, 15 Jul 2015 13:51:01 +0000 (14:51 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 19 Jul 2015 20:24:42 +0000 (22:24 +0200)
commit2f7fdb9d52f2134aec9c6ab96f11be79f326d8d3
tree1a05153d7396fc42ccebe82a4fd045782d508756
parentabf4c84b25d114a32c7d2dfc77414964805a4ca5
virtio: check virtqueue parameter when detaching

If vq is NULL, there is a segmentation fault.

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
drivers/net/virtio/virtqueue.c