summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2009-04-24 22:35:03 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-05-08 14:54:33 -0700
commitb7c0d4cb0aceb99c6bdba9865008355f9cab4471 (patch)
tree1dfd525e03ada463219e53e89429685eaffdaa2d
parent1beaf51ea30d9bc4c8b40391b230da59500835c2 (diff)
downloadlwn-b7c0d4cb0aceb99c6bdba9865008355f9cab4471.tar.gz
lwn-b7c0d4cb0aceb99c6bdba9865008355f9cab4471.zip
virtio-rng: Remove false BUG for spurious callbacks
upstream commit: e5b89542ea18020961882228c26db3ba87f6e608 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> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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)
{
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);