diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2014-03-13 01:53:39 +0100 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-03-13 01:57:55 +0100 |
commit | a7c58146cf9a782113629021ba5420582fef265e (patch) | |
tree | 605daa5c14e9b9f343a0fc6061bedd9623c4f62a /drivers/net/virtio_net.c | |
parent | virtio_balloon: don't softlockup on huge balloon changes. (diff) | |
download | linux-a7c58146cf9a782113629021ba5420582fef265e.tar.xz linux-a7c58146cf9a782113629021ba5420582fef265e.zip |
virtio_net: don't crash if virtqueue is broken.
A bad implementation of virtio might cause us to mark the virtqueue
broken: we'll dev_err() in that case, and the device is useless, but
let's not BUG_ON().
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/net/virtio_net.c')
-rw-r--r-- | drivers/net/virtio_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 5632a99cbbd2..274e99722e35 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -938,7 +938,7 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd, sgs[out_num] = &stat; BUG_ON(out_num + 1 > ARRAY_SIZE(sgs)); - BUG_ON(virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC) < 0); + virtqueue_add_sgs(vi->cvq, sgs, out_num, 1, vi, GFP_ATOMIC); if (unlikely(!virtqueue_kick(vi->cvq))) return status == VIRTIO_NET_OK; |