Skip to content

Commit

Permalink
uml: aIO deadlock avoidance
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Dike authored and Linus Torvalds committed May 7, 2007
1 parent a6ea4cc commit 8603ec8
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/um/os-Linux/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8603ec8

Please sign in to comment.