diff options
author | Mark McLoughlin <markmc@redhat.com> | 2009-02-03 13:33:53 +1030 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-02 19:17:56 -0800 |
commit | 3fff0179e33cd7d0a688dab65700c46ad089e934 (patch) | |
tree | 34c30ceedb3c5ae5cb6a5fb8d1c62aed7c845054 /drivers/video/n411.c | |
parent | 720eba31f47aeade8ec130ca7f4353223c49170f (diff) |
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>
Diffstat (limited to 'drivers/video/n411.c')
0 files changed, 0 insertions, 0 deletions