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-- 6.5 KB
Makefile -rw-r--r-- 1.3 KB
allocpercpu.c -rw-r--r-- 4.0 KB
backing-dev.c -rw-r--r-- 7.0 KB
bootmem.c -rw-r--r-- 17.8 KB
bounce.c -rw-r--r-- 6.5 KB
dmapool.c -rw-r--r-- 12.9 KB
fadvise.c -rw-r--r-- 3.3 KB
failslab.c -rw-r--r-- 1.3 KB
filemap.c -rw-r--r-- 65.0 KB
filemap_xip.c -rw-r--r-- 11.0 KB
fremap.c -rw-r--r-- 6.7 KB
highmem.c -rw-r--r-- 8.7 KB
hugetlb.c -rw-r--r-- 60.1 KB
internal.h -rw-r--r-- 7.9 KB
maccess.c -rw-r--r-- 1.4 KB
madvise.c -rw-r--r-- 9.5 KB
memcontrol.c -rw-r--r-- 56.9 KB
memory.c -rw-r--r-- 86.1 KB
memory_hotplug.c -rw-r--r-- 20.8 KB
mempolicy.c -rw-r--r-- 59.3 KB
mempool.c -rw-r--r-- 9.0 KB
migrate.c -rw-r--r-- 25.7 KB
mincore.c -rw-r--r-- 5.7 KB
mlock.c -rw-r--r-- 16.5 KB
mm_init.c -rw-r--r-- 3.7 KB
mmap.c -rw-r--r-- 64.1 KB
mmu_notifier.c -rw-r--r-- 8.2 KB
mmzone.c -rw-r--r-- 1.5 KB
mprotect.c -rw-r--r-- 7.5 KB
mremap.c -rw-r--r-- 11.1 KB
msync.c -rw-r--r-- 2.4 KB
nommu.c -rw-r--r-- 45.9 KB
oom_kill.c -rw-r--r-- 16.4 KB
page-writeback.c -rw-r--r-- 39.3 KB
page_alloc.c -rw-r--r-- 130.2 KB
page_cgroup.c -rw-r--r-- 10.5 KB
page_io.c -rw-r--r-- 3.4 KB
page_isolation.c -rw-r--r-- 3.6 KB
pagewalk.c -rw-r--r-- 3.2 KB
pdflush.c -rw-r--r-- 6.6 KB
prio_tree.c -rw-r--r-- 6.3 KB
quicklist.c -rw-r--r-- 2.4 KB
readahead.c -rw-r--r-- 13.4 KB
rmap.c -rw-r--r-- 34.2 KB
shmem.c -rw-r--r-- 67.9 KB
shmem_acl.c -rw-r--r-- 4.6 KB
slab.c -rw-r--r-- 115.1 KB
slob.c -rw-r--r-- 15.9 KB
slub.c -rw-r--r-- 105.9 KB
sparse-vmemmap.c -rw-r--r-- 4.2 KB
sparse.c -rw-r--r-- 16.2 KB
swap.c -rw-r--r-- 14.5 KB
swap_state.c -rw-r--r-- 10.1 KB
swapfile.c -rw-r--r-- 50.5 KB
thrash.c -rw-r--r-- 2.0 KB
truncate.c -rw-r--r-- 13.0 KB
util.c -rw-r--r-- 3.9 KB
vmalloc.c -rw-r--r-- 43.0 KB
vmscan.c -rw-r--r-- 72.6 KB
vmstat.c -rw-r--r-- 22.8 KB

back to top