summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2012-01-08 17:07:28 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-25 16:13:29 -0800
commit802f43594d6e4d2ac61086d239153c17873a0428 (patch)
tree47ec928d70125c54b0cedd833d74285d5dc05db5 /kernel/trace
parentbb9b57cc544d4c6a88a370338783c1390815d7ed (diff)
Unused iocbs in a batch should not be accounted as active.
commit 69e4747ee9727d660b88d7e1efe0f4afcb35db1b upstream. Since commit 080d676de095 ("aio: allocate kiocbs in batches") iocbs are allocated in a batch during processing of first iocbs. All iocbs in a batch are automatically added to ctx->active_reqs list and accounted in ctx->reqs_active. If one (not the last one) of iocbs submitted by an user fails, further iocbs are not processed, but they are still present in ctx->active_reqs and accounted in ctx->reqs_active. This causes process to stuck in a D state in wait_for_all_aios() on exit since ctx->reqs_active will never go down to zero. Furthermore since kiocb_batch_free() frees iocb without removing it from active_reqs list the list become corrupted which may cause oops. Fix this by removing iocb from ctx->active_reqs and updating ctx->reqs_active in kiocb_batch_free(). Signed-off-by: Gleb Natapov <gleb@redhat.com> Reviewed-by: Jeff Moyer <jmoyer@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'kernel/trace')
0 files changed, 0 insertions, 0 deletions