mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-12 05:48:39 +08:00
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>
This commit is contained in:
parent
9f5a691253
commit
e5b89542ea
@ -37,9 +37,9 @@ static void random_recv_done(struct virtqueue *vq)
|
|||||||
{
|
{
|
||||||
int len;
|
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))
|
if (!vq->vq_ops->get_buf(vq, &len))
|
||||||
BUG();
|
return;
|
||||||
|
|
||||||
data_left = len / sizeof(random_data[0]);
|
data_left = len / sizeof(random_data[0]);
|
||||||
complete(&have_data);
|
complete(&have_data);
|
||||||
|
Loading…
Reference in New Issue
Block a user