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
Makefile -rw-r--r-- 335 bytes
compat.c -rw-r--r-- 17.0 KB
compat_mq.c -rw-r--r-- 4.0 KB
ipc_sysctl.c -rw-r--r-- 6.9 KB
ipcns_notifier.c -rw-r--r-- 2.2 KB
mqueue.c -rw-r--r-- 30.4 KB
msg.c -rw-r--r-- 20.8 KB
msgutil.c -rw-r--r-- 2.3 KB
namespace.c -rw-r--r-- 2.5 KB
sem.c -rw-r--r-- 33.9 KB
shm.c -rw-r--r-- 25.4 KB
util.c -rw-r--r-- 23.0 KB
util.h -rw-r--r-- 4.5 KB

back to top