aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAmit Shah2013-03-29 06:00:08 -0500
committerGreg Kroah-Hartman2013-04-05 11:26:15 -0500
commitd9d3fba85c14cef1dbdace865d7825c01839c941 (patch)
tree76613abd7336cada2496a1dc3948754b1b5637b4 /fs
parent566ccc5afe7305ad8b83ec508d843e9486a598d4 (diff)
downloadkernel-omap-d9d3fba85c14cef1dbdace865d7825c01839c941.tar.gz
kernel-omap-d9d3fba85c14cef1dbdace865d7825c01839c941.tar.xz
kernel-omap-d9d3fba85c14cef1dbdace865d7825c01839c941.zip
virtio: console: add locking around c_ovq operations
commit 9ba5c80b1aea8648a3efe5f22dc1f7cacdfbeeb8 upstream. When multiple ovq operations are being performed (lots of open/close operations on virtio_console fds), the __send_control_msg() function can get confused without locking. A simple recipe to cause badness is: * create a QEMU VM with two virtio-serial ports * in the guest, do while true;do echo abc >/dev/vport0p1;done while true;do echo edf >/dev/vport0p2;done In one run, this caused a panic in __send_control_msg(). In another, I got virtio_console virtio0: control-o:id 0 is not a head! This also results repeated messages similar to these on the host: qemu-kvm: virtio-serial-bus: Unexpected port id 478762112 for device virtio-serial-bus.0 qemu-kvm: virtio-serial-bus: Unexpected port id 478762368 for device virtio-serial-bus.0 Reported-by: FuXiangChun <xfu@redhat.com> Signed-off-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Reviewed-by: Asias He <asias@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions