mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 04:04:06 +00:00
um: virtio_uml: move device breaking into workqueue
[ Upstream commitabdeb4fa5e
] We should not be calling virtio_break_device from an IRQ context. Move breaking the device into the workqueue so that it is done from a reasonable context. Fixes:af9fb41ed3
("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
6315b4f200
commit
0e5457cbd1
1 changed files with 15 additions and 1 deletions
|
@ -170,7 +170,6 @@ static void vhost_user_check_reset(struct virtio_uml_device *vu_dev,
|
|||
|
||||
vu_dev->registered = 0;
|
||||
|
||||
virtio_break_device(&vu_dev->vdev);
|
||||
schedule_work(&pdata->conn_broken_wk);
|
||||
}
|
||||
|
||||
|
@ -1134,6 +1133,15 @@ void virtio_uml_set_no_vq_suspend(struct virtio_device *vdev,
|
|||
|
||||
static void vu_of_conn_broken(struct work_struct *wk)
|
||||
{
|
||||
struct virtio_uml_platform_data *pdata;
|
||||
struct virtio_uml_device *vu_dev;
|
||||
|
||||
pdata = container_of(wk, struct virtio_uml_platform_data, conn_broken_wk);
|
||||
|
||||
vu_dev = platform_get_drvdata(pdata->pdev);
|
||||
|
||||
virtio_break_device(&vu_dev->vdev);
|
||||
|
||||
/*
|
||||
* We can't remove the device from the devicetree so the only thing we
|
||||
* can do is warn.
|
||||
|
@ -1264,8 +1272,14 @@ static int vu_unregister_cmdline_device(struct device *dev, void *data)
|
|||
static void vu_conn_broken(struct work_struct *wk)
|
||||
{
|
||||
struct virtio_uml_platform_data *pdata;
|
||||
struct virtio_uml_device *vu_dev;
|
||||
|
||||
pdata = container_of(wk, struct virtio_uml_platform_data, conn_broken_wk);
|
||||
|
||||
vu_dev = platform_get_drvdata(pdata->pdev);
|
||||
|
||||
virtio_break_device(&vu_dev->vdev);
|
||||
|
||||
vu_unregister_cmdline_device(&pdata->pdev->dev, NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue