diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-05-06 17:51:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-07 15:13:03 -0400 |
commit | 8603ec81487a5fefbc29611ff0d635b33b6da990 (patch) | |
tree | 2cb7a391880aef15f33a0cea71bfd09ac5264c8f /arch/um/os-Linux | |
parent | a6ea4cceed18edebe1eb6001cb9e0f88cd741a6c (diff) |
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@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/os-Linux')
-rw-r--r-- | arch/um/os-Linux/aio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c index 5d258eb4f506..9bf944f6a1db 100644 --- a/arch/um/os-Linux/aio.c +++ b/arch/um/os-Linux/aio.c | |||
@@ -221,6 +221,11 @@ static int init_aio_24(void) | |||
221 | 221 | ||
222 | aio_req_fd_w = fds[0]; | 222 | aio_req_fd_w = fds[0]; |
223 | aio_req_fd_r = fds[1]; | 223 | aio_req_fd_r = fds[1]; |
224 | |||
225 | err = os_set_fd_block(aio_req_fd_w, 0); | ||
226 | if(err) | ||
227 | goto out_close_pipe; | ||
228 | |||
224 | err = run_helper_thread(not_aio_thread, NULL, | 229 | err = run_helper_thread(not_aio_thread, NULL, |
225 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); | 230 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); |
226 | if(err < 0) | 231 | if(err < 0) |