We've now got a proposed patch in the -mm tree that fixes the problem where
io_getevents() doesn't wake up after the io context is destroyed by
io_destroy(). Until that patch makes it in to the mainstream kernel, we
should probably add it to ours.
------------------------------------------------------
Subject: aio: io_getevents() should return if io_destroy() is invoked
From: Jeff Moyer <jmoyer@redhat.com>
This patch wakes up a thread waiting in io_getevents if another thread
destroys the context. This was tested using a small program that spawns a
thread to wait in io_getevents while the parent thread destroys the io context
and then waits for the getevents thread to exit. Without this patch, the
program hangs indefinitely. With the patch, the program exits as expected.
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Cc: Zach Brown <zach.brown@oracle.com>
Cc: Christopher Smith <x@xman.org>
Cc: Benjamin LaHaise <bcrl@kvack.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
fs/aio.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Original issue reported on code.google.com by cbsm...@gmail.com on 15 Apr 2008 at 8:35
Original issue reported on code.google.com by
cbsm...@gmail.com
on 15 Apr 2008 at 8:35Attachments: