Gleb Natapov
69e4747ee9
Unused iocbs in a batch should not be accounted as active.
...
Since commit 080d676de0 ("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 >
Cc: stable@kernel.org # 3.2
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2012-01-13 20:39:44 -08:00
..
2012-01-10 15:09:01 -08:00
2012-01-06 23:19:54 -05:00
2012-01-03 22:55:04 -05:00
2012-01-03 22:54:53 -05:00
2012-01-13 08:30:49 -08:00
2012-01-03 22:52:40 -05:00
2012-01-03 22:54:53 -05:00
2012-01-12 20:13:09 -08:00
2012-01-03 22:54:07 -05:00
2012-01-13 10:29:21 -08:00
2012-01-08 12:19:57 -08:00
2012-01-10 11:13:16 -05:00
2012-01-03 22:54:57 -05:00
2012-01-06 23:15:54 -05:00
2012-01-08 12:19:57 -08:00
2012-01-08 20:19:03 -05:00
2012-01-10 14:55:55 -08:00
2012-01-06 23:19:54 -05:00
2012-01-03 22:52:40 -05:00
2012-01-09 12:51:01 -08:00
2012-01-09 12:51:21 -08:00
2012-01-09 12:51:21 -08:00
2012-01-10 11:54:07 -05:00
2012-01-09 12:09:47 -08:00
2012-01-03 22:55:10 -05:00
2012-01-12 12:39:21 -08:00
2012-01-11 12:35:05 +00:00
2012-01-06 23:19:54 -05:00
2012-01-10 17:48:52 -05:00
2012-01-06 23:19:54 -05:00
2012-01-03 22:54:54 -05:00
2012-01-03 22:52:41 -05:00
2012-01-12 20:13:09 -08:00
2012-01-09 10:48:11 -05:00
2012-01-09 12:51:21 -08:00
2012-01-10 11:54:07 -05:00
2012-01-10 13:45:22 -08:00
2012-01-08 13:10:57 -08:00
2012-01-06 23:16:53 -05:00
2012-01-10 13:45:22 -08:00
2012-01-08 12:19:57 -08:00
2012-01-06 23:19:54 -05:00
2012-01-12 20:13:09 -08:00
2012-01-10 14:57:40 -08:00
2012-01-08 13:10:57 -08:00
2011-11-26 19:58:47 -08:00
2012-01-03 22:57:12 -05:00
2012-01-06 23:19:54 -05:00
2012-01-10 14:55:55 -08:00
2012-01-03 22:55:01 -05:00
2012-01-03 22:52:40 -05:00
2012-01-12 20:13:13 -08:00
2011-11-18 13:49:00 -08:00
2012-01-08 13:21:22 -08:00
2012-01-06 23:16:53 -05:00
2012-01-03 22:55:07 -05:00
2012-01-10 16:30:54 -08:00
2012-01-10 13:45:22 -08:00
2012-01-13 10:34:57 -08:00
2012-01-03 22:55:03 -05:00
2012-01-06 23:16:53 -05:00
2012-01-13 10:31:33 -08:00
2012-01-09 12:51:21 -08:00
2012-01-06 23:19:54 -05:00
2012-01-09 12:50:15 -08:00
2012-01-13 20:39:44 -08:00
2012-01-03 22:55:11 -05:00
2012-01-03 22:54:54 -05:00
2012-01-10 16:30:51 -08:00
2012-01-06 23:16:53 -05:00
2012-01-12 20:13:12 -08:00
2012-01-03 22:54:07 -05:00
2011-12-13 11:18:17 -08:00
2012-01-05 15:40:12 -08:00
2012-01-03 22:55:19 -05:00
2012-01-13 10:29:21 -08:00
2012-01-12 20:13:12 -08:00
2012-01-12 20:13:04 -08:00
2012-01-10 16:30:44 -08:00
2012-01-06 23:16:53 -05:00
2012-01-06 23:20:13 -05:00
2012-01-03 22:52:39 -05:00
2012-01-10 16:59:59 -08:00
2012-01-10 16:30:42 -08:00
2012-01-06 23:20:12 -05:00
2012-01-05 15:40:12 -08:00
2012-01-09 12:51:01 -08:00
2012-01-10 16:30:51 -08:00
2012-01-03 22:54:07 -05:00
2011-12-26 10:25:26 -08:00
2012-01-06 23:15:54 -05:00
2012-01-06 23:20:12 -05:00
2012-01-06 23:15:54 -05:00
2012-01-08 13:21:22 -08:00
2012-01-06 23:16:53 -05:00
2012-01-12 20:13:04 -08:00
2012-01-03 22:57:11 -05:00
2012-01-03 22:57:11 -05:00
2012-01-06 23:19:54 -05:00
2012-01-03 22:52:40 -05:00
2012-01-03 22:54:07 -05:00
2012-01-03 22:53:07 -05:00
2012-01-06 23:20:13 -05:00
2012-01-03 22:54:07 -05:00
2012-01-03 22:52:40 -05:00