Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio_pci: fix use after free on release
KASan detected a use-after-free error in virtio-pci remove code. In virtio_pci_remove(), vp_dev is still used after being freed in unregister_virtio_device() (in virtio_pci_release_dev() more precisely). To fix, keep a reference until cleanup is done. Fixes: 63bd62a ("virtio_pci: defer kfree until release callback") Reported-by: Jerome Marchand <[email protected]> Cc: [email protected] Cc: Sasha Levin <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> Tested-by: Jerome Marchand <[email protected]>
- Loading branch information