Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ac625a3986034d79938baf9604210280fae35fa
Commit:     9ac625a3986034d79938baf9604210280fae35fa
Parent:     7c06a8dc64a2d1884bd19b4c6353d9267ae4e3e1
Author:     Jeff Dike <[EMAIL PROTECTED]>
AuthorDate: Wed Nov 14 17:00:23 2007 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Nov 14 18:45:43 2007 -0800

    uml: fix spurious IRQ testing
    
    The spurious IRQ testing in request_irq is mishandled in um_request_irq, 
which
    sets the incoming file descriptors non-blocking only after request_irq
    succeeds.  This results in the spurious irq calling read on a blocking
    descriptor, and a hang.
    
    Fixed by reversing the O_NONBLOCK setting and the request_irq call.
    
    Signed-off-by: Jeff Dike <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 arch/um/kernel/irq.c |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 70c2d62..ba11ccd 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -347,14 +347,15 @@ int um_request_irq(unsigned int irq, int fd, int type,
 {
        int err;
 
-       err = request_irq(irq, handler, irqflags, devname, dev_id);
-       if (err)
-               return err;
-
-       if (fd != -1)
+       if (fd != -1) {
                err = activate_fd(irq, fd, type, dev_id);
-       return err;
+               if (err)
+                       return err;
+       }
+
+       return request_irq(irq, handler, irqflags, devname, dev_id);
 }
+
 EXPORT_SYMBOL(um_request_irq);
 EXPORT_SYMBOL(reactivate_fd);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to