[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20070412162805.GA7250@c2.user-mode-linux.org>
Date: Thu, 12 Apr 2007 12:28:05 -0400
From: Jeff Dike <jdike@...toit.com>
To: Andrew Morton <akpm@...l.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
uml-devel <user-mode-linux-devel@...ts.sourceforge.net>
Subject: [ PATCH 5/6 ] UML - AIO deadlock avoidance
Allow deadlocks to be avoided in the AIO code by setting the pipe to
the I/O thread non-blocking.
Signed-off-by: Jeff Dike <jdike@...ux.intel.com>
--
arch/um/os-Linux/aio.c | 5 +++++
1 file changed, 5 insertions(+)
Index: linux-2.6.21-mm/arch/um/os-Linux/aio.c
===================================================================
--- linux-2.6.21-mm.orig/arch/um/os-Linux/aio.c 2007-04-12 11:34:40.000000000 -0400
+++ linux-2.6.21-mm/arch/um/os-Linux/aio.c 2007-04-12 11:47:14.000000000 -0400
@@ -221,6 +221,11 @@ static int init_aio_24(void)
aio_req_fd_w = fds[0];
aio_req_fd_r = fds[1];
+
+ err = os_set_fd_block(aio_req_fd_w, 0);
+ if(err)
+ goto out_close_pipe;
+
err = run_helper_thread(not_aio_thread, NULL,
CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0);
if(err < 0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists