Revision 3fff0179e33cd7d0a688dab65700c46ad089e934 authored by Mark McLoughlin on 03 February 2009, 03:03:53 UTC, committed by Linus Torvalds on 03 February 2009, 03:17:56 UTC
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>
1 parent 720eba3
History
File Mode Size
Kconfig -rw-r--r-- 33.8 KB
Makefile -rw-r--r-- 1.1 KB
calibrate.c -rw-r--r-- 5.0 KB
do_mounts.c -rw-r--r-- 9.0 KB
do_mounts.h -rw-r--r-- 1.3 KB
do_mounts_initrd.c -rw-r--r-- 3.2 KB
do_mounts_md.c -rw-r--r-- 7.9 KB
do_mounts_rd.c -rw-r--r-- 9.8 KB
initramfs.c -rw-r--r-- 12.8 KB
main.c -rw-r--r-- 21.1 KB
noinitramfs.c -rw-r--r-- 1.4 KB
version.c -rw-r--r-- 1.1 KB

back to top