commit | 7ca111ad3bca069f921b4234e5b3ccbbfd7a11d8 | [log] [tgz] |
---|---|---|
author | Amit Shah <amit.shah@redhat.com> | Mon Jun 17 17:06:42 2013 +0530 |
committer | Amit Shah <amit.shah@redhat.com> | Wed Jul 24 13:12:19 2013 +0530 |
tree | 9207082a0c19040d13a185a9c6b164e4640acf58 | |
parent | 04012e3076943f17c8cfc77a196701c8f0b8964f [diff] |
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: <stable@vger.kernel.org> Reported-by: Mateusz Guzik <mguzik@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com>