aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2009-04-23 03:12:59 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-24 16:28:30 -0400
commite5b89542ea18020961882228c26db3ba87f6e608 (patch)
treed304de3e207ab02d9e02f944f54cebcf31ea2e73 /drivers
parent9f5a691253924fd033a58c6b1fed57bb0a4eccf4 (diff)
virtio-rng: Remove false BUG for spurious callbacks
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/virtio-rng.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c
index d0e563e4fc39..86e83f883139 100644
--- a/drivers/char/hw_random/virtio-rng.c
+++ b/drivers/char/hw_random/virtio-rng.c
@@ -37,9 +37,9 @@ static void random_recv_done(struct virtqueue *vq)
37{ 37{
38 int len; 38 int len;
39 39
40 /* We never get spurious callbacks. */ 40 /* We can get spurious callbacks, e.g. shared IRQs + virtio_pci. */
41 if (!vq->vq_ops->get_buf(vq, &len)) 41 if (!vq->vq_ops->get_buf(vq, &len))
42 BUG(); 42 return;
43 43
44 data_left = len / sizeof(random_data[0]); 44 data_left = len / sizeof(random_data[0]);
45 complete(&have_data); 45 complete(&have_data);