]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
UML: console should handle spurious IRQS
authorJeff Dike <jdike@addtoit.com>
Tue, 31 Jul 2007 07:37:44 +0000 (00:37 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 31 Jul 2007 22:39:37 +0000 (15:39 -0700)
The previous DEBUG_SHIRQ patch missed one case.  The console doesn't
set its host descriptors non-blocking.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/drivers/chan_kern.c

index 368d3e97dfd9a85a918c5455fb63390f3f0ab197..629b00e3b0b0c36f39800836d8525afd14456999 100644 (file)
@@ -157,7 +157,7 @@ static void tty_receive_char(struct tty_struct *tty, char ch)
 
 static int open_one_chan(struct chan *chan)
 {
-       int fd;
+       int fd, err;
 
        if(chan->opened)
                return 0;
@@ -168,6 +168,13 @@ static int open_one_chan(struct chan *chan)
                                     chan->data, &chan->dev);
        if(fd < 0)
                return fd;
+
+       err = os_set_fd_block(fd, 0);
+       if (err) {
+               (*chan->ops->close)(fd, chan->data);
+               return err;
+       }
+
        chan->fd = fd;
 
        chan->opened = 1;