linux/drivers/virtio
Mark McLoughlin 3fff0179e3 virtio-pci: do not oops on config change if driver not loaded
The host really shouldn't be notifying us of config changes
before the device status is VIRTIO_CONFIG_S_DRIVER or
VIRTIO_CONFIG_S_DRIVER_OK.

However, if we do happen to be interrupted while we're not
attached to a driver, we really shouldn't oops. Prevent
this simply by checking that device->driver is non-NULL
before trying to notify the driver of config changes.

Problem observed by doing a "set_link virtio.0 down" with
QEMU before the net driver had been loaded.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-02-02 19:17:56 -08:00
..
config.c
Kconfig virtio: balloon driver 2008-02-04 23:50:13 +11:00
Makefile virtio: balloon driver 2008-02-04 23:50:13 +11:00
virtio_balloon.c virtio: avoid implicit use of Linux page size in balloon interface 2008-12-30 09:26:04 +10:30
virtio_pci.c virtio-pci: do not oops on config change if driver not loaded 2009-02-02 19:17:56 -08:00
virtio_ring.c virtio: hand virtio ring alignment as argument to vring_new_virtqueue 2008-12-30 09:26:03 +10:30
virtio.c virtio: struct device - replace bus_id with dev_name(), dev_set_name() 2008-12-30 09:25:56 +10:30