linux/drivers/virtio
Michael S. Tsirkin 3d2a3774c1 virtio-balloon: do not call blocking ops when !TASK_RUNNING
virtio balloon has this code:
        wait_event_interruptible(vb->config_change,
                                 (diff = towards_target(vb)) != 0
                                 || vb->need_stats_update
                                 || kthread_should_stop()
                                 || freezing(current));

Which is a problem because towards_target() call might block after
wait_event_interruptible sets task state to TAST_INTERRUPTIBLE, causing
the task_struct::state collision typical of nesting of sleeping
primitives

See also http://lwn.net/Articles/628628/ or Thomas's
bug report
http://article.gmane.org/gmane.linux.kernel.virtualization/24846
for a fuller explanation.

To fix, rewrite using wait_woken.

Cc: stable@vger.kernel.org
Reported-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-03-10 11:56:15 +10:30
..
config.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
Kconfig virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
Makefile virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
virtio_balloon.c virtio-balloon: do not call blocking ops when !TASK_RUNNING 2015-03-10 11:56:15 +10:30
virtio_mmio.c virtio-mmio: Update the device to OASIS spec version 2015-01-23 14:57:10 +10:30
virtio_pci_common.c virtio_pci: add module param to force legacy mode 2015-01-21 16:29:01 +10:30
virtio_pci_common.h virtio_pci: add an option to disable legacy driver 2015-01-21 16:28:59 +10:30
virtio_pci_legacy.c virtio_pci: move probe/remove code to common 2015-01-21 16:28:51 +10:30
virtio_pci_modern.c virtio_pci: use 16-bit accessor for queue_enable. 2015-02-11 15:03:16 +10:30
virtio_ring.c virtio: Avoid possible kernel panic if DEBUG is enabled. 2015-02-11 15:03:14 +10:30
virtio.c virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice. 2015-02-17 16:19:29 +10:30