linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* BUG_ON in virtio-ring.c
@ 2013-05-24  3:40 Dave Airlie
  2013-05-27  1:42 ` Rusty Russell
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2013-05-24  3:40 UTC (permalink / raw)
  To: Rusty Russell, LKML

Hi Rusty,

current virtio-ring.c has a BUG_ON in virtqueue_add that checks
total_sg > vg->vring.num, however I'm not sure it really is 100%
correct.

If I have an indirect ring and I'm adding sgs to it and the host is
delayed (say I've got a thread consuming things from the vring and its
off doing something interesting),
I'd really like to get ENOSPC back from virtqueue_add. However if the
indirect addition fails due to free_sg being 0, we hit the BUG_ON
before we ever get to the ENOSPC check.

the BUG_ON is quite valid in the no indirect case, but when we have
indirect buffers it doesn't seem like it always makes sense.

Not sure best way to fix it, I'm just a virtio newbie :)

Dave.

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

end of thread, other threads:[~2014-12-18  4:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-24  3:40 BUG_ON in virtio-ring.c Dave Airlie
2013-05-27  1:42 ` Rusty Russell
2013-05-27  3:29   ` Dave Airlie
2013-05-27  5:38     ` Rusty Russell
2014-10-07 15:46       ` Alexey Lapitsky
2014-10-13  5:39         ` Rusty Russell
2014-11-04 14:44           ` Alexey Lapitsky
2014-12-18  3:13             ` 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).