mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-02-06 11:13:09 +08:00
rpmsg: virtio: deinit rvdev->vdev when rvdev is deinited
If rvdev is deinited, using rvdev->vdev may cause a use-after-free error. Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
400c063456
commit
8f14611db8
@@ -976,5 +976,6 @@ void rpmsg_deinit_vdev(struct rpmsg_virtio_device *rvdev)
|
||||
|
||||
virtio_delete_virtqueues(rvdev->vdev);
|
||||
metal_mutex_deinit(&rdev->lock);
|
||||
rvdev->vdev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user