diff options
author | Nick Piggin <npiggin@gmail.com> | 2011-02-25 17:44:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-25 18:07:37 -0500 |
commit | 3bd9a5d734c7cc7533b27abf451416c7f50095a7 (patch) | |
tree | 357fc4ec95d7163cb96891151df51f6d7d130d0a /fs/pipe.c | |
parent | 29723fccc837d20039078f7a571e8d457eb0d6c6 (diff) |
aio: fix rcu ioctx lookup
aio-dio-invalidate-failure GPFs in aio_put_req from io_submit.
lookup_ioctx doesn't implement the rcu lookup pattern properly.
rcu_read_lock does not prevent refcount going to zero, so we might take
a refcount on a zero count ioctx.
Fix the bug by atomically testing for zero refcount before incrementing.
[jack@suse.cz: added comment into the code]
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Nick Piggin <npiggin@kernel.dk>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/pipe.c')
0 files changed, 0 insertions, 0 deletions