aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/chan_user.c
diff options
context:
space:
mode:
authorEduard-Gabriel Munteanu <maxdamage@aladin.ro>2007-07-16 02:38:51 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-16 12:05:38 -0400
commit89df6bfc04059716de2eb2fe529f05b3e124fafd (patch)
tree5f28a79bc65549f48e153f18b1692d9cf462c628 /arch/um/drivers/chan_user.c
parente18eecb8b35703a5eea73ee2b45324262029e62c (diff)
uml: DEBUG_SHIRQ fixes
DEBUG_SHIRQ generates spurious interrupts, triggering handlers such as mconsole_interrupt() or line_interrupt(). They expect data to be available to be read from their sockets/pipes, but in the case of spurious interrupts, the host didn't actually send anything, so UML hangs in read() and friends. Setting those fd's as O_NONBLOCK makes DEBUG_SHIRQ-enabled UML kernels boot and run correctly. Signed-off-by: Eduard-Gabriel Munteanu <maxdamage@aladin.ro> 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>
Diffstat (limited to 'arch/um/drivers/chan_user.c')
-rw-r--r--arch/um/drivers/chan_user.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c
index 13f0bf852b2a..5d1289d33410 100644
--- a/arch/um/drivers/chan_user.c
+++ b/arch/um/drivers/chan_user.c
@@ -170,7 +170,13 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out)
170 err = -EINVAL; 170 err = -EINVAL;
171 goto out_close; 171 goto out_close;
172 } 172 }
173 return err ; 173
174 if (os_set_fd_block(*fd_out, 0)) {
175 printk("winch_tramp: failed to set thread_fd non-blocking.\n");
176 goto out_close;
177 }
178
179 return err;
174 180
175 out_close: 181 out_close:
176 os_close_file(fds[1]); 182 os_close_file(fds[1]);