Skip to content

Commit

Permalink
virtio-rng: Remove false BUG for spurious callbacks
Browse files Browse the repository at this point in the history
The virtio-rng drivers checks for spurious callbacks. Since
callbacks can be implemented via shared interrupts (e.g. PCI) this
could lead to guest kernel oopses with lots of virtio devices.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
borntraeger authored and torvalds committed Apr 24, 2009
1 parent 9f5a691 commit e5b8954
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/char/hw_random/virtio-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ static void random_recv_done(struct virtqueue *vq)
{
int len;

/* We never get spurious callbacks. */
/* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
if (!vq->vq_ops->get_buf(vq, &len))
BUG();
return;

data_left = len / sizeof(random_data[0]);
complete(&have_data);
Expand Down

0 comments on commit e5b8954

Please sign in to comment.