Skip to content

Commit 8e9cd85

Browse files
benzearichardweinberger
authored andcommitted
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: af9fb41 ("um: virtio_uml: Fix broken device handling in time-travel") Signed-off-by: Benjamin Berg <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
1 parent 8a6ca54 commit 8e9cd85

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/um/drivers/virtio_uml.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@ static void vhost_user_check_reset(struct virtio_uml_device *vu_dev,
168168
if (!vu_dev->registered)
169169
return;
170170

171+
vu_dev->registered = 0;
172+
171173
virtio_break_device(&vu_dev->vdev);
172174
schedule_work(&pdata->conn_broken_wk);
173175
}

0 commit comments

Comments
 (0)