virtio: console: add locking in port unplug path
authorAmit Shah <amit.shah@redhat.com>
Mon, 29 Jul 2013 04:54:15 +0000 (14:24 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Jul 2013 05:20:48 +0000 (14:50 +0930)
commit5549fb25811710585d5ec77a0e6a1fbc8808df93
treece02bc03118f48b02baa4690d0dd057ff589fbb9
parentc6017e793b932e84b1c998f9b4c08d74ff0ea9c0
virtio: console: add locking in port unplug path

Port unplug can race with close() in port_fops_release().
port_fops_release() already takes the necessary locks, ensure
unplug_port() does that too.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c