When an application is mixing sync and async IO it ends up crashing later on in the sync path when calling lock_page_slow as the io_wait queue has been set to NULL in a previous AIO request. Therefore after the retry method has been called the task io_wait queue should be set to the default queue. This patch applies over Suparna's wait-bit patchset: - modify-wait-bit-action-args - lock_page_wait - init-wait-bit-key - tsk-default-io-wait - aio-wait-bit - aio-wait-page and could be folded into aio-wait-bit. Signed-off-by: Sébastien Dugué aio.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6.12/fs/aio.c =================================================================== --- linux-2.6.12.orig/fs/aio.c 2005-06-30 17:48:47.000000000 +0200 +++ linux-2.6.12/fs/aio.c 2005-06-30 17:48:57.000000000 +0200 @@ -714,7 +714,7 @@ BUG_ON(!is_sync_wait(current->io_wait)); current->io_wait = &iocb->ki_wait.wait; ret = retry(iocb); - current->io_wait = NULL; + current->io_wait = ¤t->__wait.wait; if (-EIOCBRETRY != ret) { if (-EIOCBQUEUED != ret) {