Commit 8e9cd851 authored by Benjamin Berg's avatar Benjamin Berg Committed by Richard Weinberger
Browse files

um: virtio_uml: mark device as unregistered when breaking it



Mark the device as not registered anymore when scheduling the work to
remove it. Otherwise we could end up scheduling the work multiple times
in a row, including scheduling it while it is already running.

Fixes: af9fb41e ("um: virtio_uml: Fix broken device handling in time-travel")
Signed-off-by: default avatarBenjamin Berg <benjamin.berg@intel.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 8a6ca543
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -168,6 +168,8 @@ static void vhost_user_check_reset(struct virtio_uml_device *vu_dev,
	if (!vu_dev->registered)
		return;

	vu_dev->registered = 0;

	virtio_break_device(&vu_dev->vdev);
	schedule_work(&pdata->conn_broken_wk);
}