Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtio: console: fix race with port unplug and open/close
There's a window between find_port_by_devt() returning a port and us taking a kref on the port, where the port could get unplugged. Fix it by taking the reference in find_port_by_devt() itself. Problem reported and analyzed by Mateusz Guzik. CC: <[email protected]> Reported-by: Mateusz Guzik <[email protected]> Signed-off-by: Amit Shah <[email protected]> Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information