From: Mark McLoughlin Date: Tue, 3 Feb 2009 03:03:53 +0000 (+1030) Subject: virtio-pci: do not oops on config change if driver not loaded X-Git-Tag: v2.6.29-rc4~74 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fff0179e33cd7d0a688dab65700c46ad089e934;p=pandora-kernel.git 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 Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed