linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] virtio_net: don't crash if virtqueue is broken.
@ 2014-01-15  2:36 Rusty Russell
  2014-01-15  2:36 ` [PATCH 2/6] virtio_blk: don't crash, report error " Rusty Russell
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Rusty Russell @ 2014-01-15  2:36 UTC (permalink / raw)
  To: linux-kernel; +Cc: Heinz Graalfs, Rusty Russell

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>
---
 drivers/net/virtio_net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 5d776447d9c3..0949688ae540 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -904,8 +904,7 @@ static bool virtnet_send_command(struct virtnet_info *vi, u8 class, u8 cmd,
 	sgs[out_num + in_num++] = &stat;
 
 	BUG_ON(out_num + in_num > ARRAY_SIZE(sgs));
-	BUG_ON(virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, vi, GFP_ATOMIC)
-	       < 0);
+	virtqueue_add_sgs(vi->cvq, sgs, out_num, in_num, vi, GFP_ATOMIC);
 
 	if (unlikely(!virtqueue_kick(vi->cvq)))
 		return status == VIRTIO_NET_OK;
-- 
1.8.3.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-02-01  8:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-15  2:36 [PATCH 1/6] virtio_net: don't crash if virtqueue is broken Rusty Russell
2014-01-15  2:36 ` [PATCH 2/6] virtio_blk: don't crash, report error " Rusty Russell
2014-01-30  9:09   ` Heinz Graalfs
2014-01-31  5:00     ` Rusty Russell
2014-01-15  2:36 ` [PATCH 3/6] virtio_balloon: don't crash " Rusty Russell
2014-01-15  2:36 ` [PATCH 4/6] virtio-rng: " Rusty Russell
2014-01-15  2:36 ` [PATCH 5/6] virtio: fail adding buffer on broken queues Rusty Russell
2014-01-15  2:36 ` [PATCH 6/6] virtio: virtio_break_device() to mark all virtqueues broken Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).