From: Chris Wright Date: Fri, 24 Apr 2009 22:40:36 +0000 (-0700) Subject: 2.6.29: add virtio rng patch X-Git-Tag: v2.6.29.2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8bc82caeee5addfbc97bd46f689c5a2cbe3e6bcd;p=thirdparty%2Fkernel%2Fstable-queue.git 2.6.29: add virtio rng patch --- diff --git a/queue-2.6.29/series b/queue-2.6.29/series index b56a0dd7956..e1617abb2df 100644 --- a/queue-2.6.29/series +++ b/queue-2.6.29/series @@ -10,3 +10,4 @@ kvm-mmu-disable-global-page-optimization.patch kvm-fix-overlapping-check-for-memory-slots.patch kvm-x86-release-time_page-on-vcpu-destruction.patch usb-unusual-device-support-for-gold-mp3-player-energy.patch +virtio-rng-remove-false-bug-for-spurious-callbacks.patch diff --git a/queue-2.6.29/virtio-rng-remove-false-bug-for-spurious-callbacks.patch b/queue-2.6.29/virtio-rng-remove-false-bug-for-spurious-callbacks.patch new file mode 100644 index 00000000000..df4b931c1bc --- /dev/null +++ b/queue-2.6.29/virtio-rng-remove-false-bug-for-spurious-callbacks.patch @@ -0,0 +1,36 @@ +From chrisw@hera.kernel.org Fri Apr 24 15:37:55 2009 +Date: Fri, 24 Apr 2009 22:35:03 GMT +Message-Id: <200904242235.n3OMZ3Uq008747@hera.kernel.org> +From: Christian Borntraeger +To: jejb@kernel.org, stable@kernel.org +Subject: 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 +Cc: Rusty Russell +Cc: stable@kernel.org +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + drivers/char/hw_random/virtio-rng.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- 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 virt + { + 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);