Commit 7ebf70cf authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Johannes Berg
Browse files

um: virtio_uml: Fix use-after-free after put_device in probe



When register_virtio_device() fails in virtio_uml_probe(),
the code sets vu_dev->registered = 1 even though
the device was not successfully registered.
This can lead to use-after-free or other issues.

Fixes: 04e5b1fb ("um: virtio: Remove device on disconnect")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent c4560130
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment