Merge branch 'master' into virtio-next
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 9 Aug 2013 03:30:39 +0000 (13:00 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 9 Aug 2013 03:30:39 +0000 (13:00 +0930)
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 <rusty@rustcorp.com.au>
1  2 
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);