diff options
author | Benjamin Berg <benjamin.berg@intel.com> | 2023-02-09 10:00:03 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2023-02-13 10:14:32 +0100 |
commit | 8e9cd85139a2149d5a7c121b05e0cdb8287311f9 (patch) | |
tree | 2ef10c710b96c234ab4d7fdba832bcda7c6da222 /arch/um | |
parent | 8a6ca543646f2940832665dbf4e04105262505e2 (diff) | |
download | linux-8e9cd85139a2149d5a7c121b05e0cdb8287311f9.tar.gz |
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: af9fb41ed315 ("um: virtio_uml: Fix broken device handling in time-travel")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/virtio_uml.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/drivers/virtio_uml.c b/arch/um/drivers/virtio_uml.c index 198aaed81ce6..ecfaae7096e8 100644 --- a/arch/um/drivers/virtio_uml.c +++ b/arch/um/drivers/virtio_uml.c @@ -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); } |