commit | a3aca79feb7163e08b940ddefceabf78ab4cd8ce | [log] [tgz] |
---|---|---|
author | Amit Shah <amit.shah@redhat.com> | Wed Jun 19 01:19:20 2013 +0530 |
committer | Amit Shah <amit.shah@redhat.com> | Thu Jul 25 19:05:24 2013 +0530 |
tree | 531641f8cd5760ffbca7010e075d534d55bfd105 | |
parent | 7ca111ad3bca069f921b4234e5b3ccbbfd7a11d8 [diff] |
virtio: console: fix race in port_fops_open() and port unplug Between open() being called and processed, the port can be unplugged. Check if this happened, and bail out. A simple test script to reproduce this is: while true; do for i in $(seq 1 100); do echo $i > /dev/vport0p3; done; done; This opens and closes the port a lot of times; unplugging the port while this is happening triggers the bug. CC: <stable@vger.kernel.org> Signed-off-by: Amit Shah <amit.shah@redhat.com>