diff options
author | Amit Shah <amit.shah@redhat.com> | 2013-07-29 08:46:13 +0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2013-07-29 09:13:28 +0400 |
commit | 057b82be3ca3d066478e43b162fc082930a746c9 (patch) | |
tree | 8ca217f1b7c0e48a21540cb38779cc7a48216535 /drivers/char/ps3flash.c | |
parent | 2b4fbf029dff5a28d9bf646346dea891ec43398a (diff) | |
download | linux-057b82be3ca3d066478e43b162fc082930a746c9.tar.xz |
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>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char/ps3flash.c')
0 files changed, 0 insertions, 0 deletions