From: Rusty Russell Date: Fri, 9 Aug 2013 03:30:39 +0000 (+0930) Subject: Merge branch 'master' into virtio-next X-Git-Tag: v3.12-rc1~85^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11489736177c5930514482b4db7af862d945335d;p=platform%2Fkernel%2Flinux-stable.git Merge branch 'master' into virtio-next The next commit gets conflicts because it relies on patches which were cc:stable and thus had to be merged into Linus' tree before the coming merge window. So pull in master now. Signed-off-by: Rusty Russell --- 11489736177c5930514482b4db7af862d945335d diff --cc drivers/char/virtio_console.c index 5b60956e,fc45567..d0e75aa --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@@ -1542,16 -1554,16 +1558,18 @@@ static void unplug_port(struct port *po list_del(&port->list); spin_unlock_irq(&port->portdev->ports_lock); + spin_lock_irq(&port->inbuf_lock); if (port->guest_connected) { + /* Let the app know the port is going down. */ + send_sigio_to_port(port); + + /* Do this after sigio is actually sent */ port->guest_connected = false; port->host_connected = false; - wake_up_interruptible(&port->waitqueue); - /* Let the app know the port is going down. */ - send_sigio_to_port(port); + wake_up_interruptible(&port->waitqueue); } + spin_unlock_irq(&port->inbuf_lock); if (is_console_port(port)) { spin_lock_irq(&pdrvdata_lock);