From eb41cf78fcdbe3ba3566482c72ff314246a906cc Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 6 Apr 2016 12:16:23 +0200 Subject: virtio-blk: fix disabled mode We must not call virtio_blk_data_plane_notify if dataplane is disabled: we would hit a segmentation fault in notify_guest_bh as s->guest_notifier has not been setup and is NULL. Reviewed-by: Cornelia Huck Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/virtio/virtio-blk.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw/virtio') diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h index ae84d92107..59ae1e4358 100644 --- a/include/hw/virtio/virtio-blk.h +++ b/include/hw/virtio/virtio-blk.h @@ -53,6 +53,7 @@ typedef struct VirtIOBlock { unsigned short sector_mask; bool original_wce; VMChangeStateEntry *change; + bool dataplane_disabled; bool dataplane_started; struct VirtIOBlockDataPlane *dataplane; } VirtIOBlock; -- cgit v1.2.3