Commit 9ac625a3986034d79938baf9604210280fae35fa
Committed by
Linus Torvalds
1 parent
7c06a8dc64
Exists in
master
and in
7 other branches
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 <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 7 additions and 6 deletions Side-by-side Diff
arch/um/kernel/irq.c
... | ... | @@ -347,14 +347,15 @@ |
347 | 347 | { |
348 | 348 | int err; |
349 | 349 | |
350 | - err = request_irq(irq, handler, irqflags, devname, dev_id); | |
351 | - if (err) | |
352 | - return err; | |
353 | - | |
354 | - if (fd != -1) | |
350 | + if (fd != -1) { | |
355 | 351 | err = activate_fd(irq, fd, type, dev_id); |
356 | - return err; | |
352 | + if (err) | |
353 | + return err; | |
354 | + } | |
355 | + | |
356 | + return request_irq(irq, handler, irqflags, devname, dev_id); | |
357 | 357 | } |
358 | + | |
358 | 359 | EXPORT_SYMBOL(um_request_irq); |
359 | 360 | EXPORT_SYMBOL(reactivate_fd); |
360 | 361 |