From: Rusty Russell Date: Fri, 9 Aug 2013 03:30:39 +0000 (+0930) Subject: Merge branch 'master' into virtio-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=11489736177c5930514482b4db7af862d945335d;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 5b60956edc28,fc45567ad3ac..d0e75aa904ac --- 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);