]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'virtio/virtio-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Aug 2013 02:08:00 +0000 (12:08 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 5 Aug 2013 02:08:00 +0000 (12:08 +1000)
1  2 
drivers/char/virtio_console.c

index fc45567ad3acef079db496c9a2f495e19e5b5bba,5b60956edc2856576521db688208c6ec83e42264..d0e75aa904ac92dc1f53973a7b274a039dc45b46
@@@ -1554,16 -1542,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);