]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ocfs2: fix possible use-after-free with AIO
authorJan Kara <jack@suse.cz>
Thu, 7 Feb 2013 01:31:58 +0000 (12:31 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 18 Feb 2013 05:47:43 +0000 (16:47 +1100)
commiteeb9d3d8c3bbf40fbecd128b13c27ccba4f22d82
tree5c51388de5b0303847b372b6e2e9312fcb59e86c
parent72b5c3629358279f486086343bb00664d147d935
ocfs2: fix possible use-after-free with AIO

Running AIO is pinning inode in memory using file reference. Once AIO
is completed using aio_complete(), file reference is put and inode can
be freed from memory. So we have to be sure that calling aio_complete()
is the last thing we do with the inode.

Signed-off-by: Jan Kara <jack@suse.cz>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Acked-by: Joel Becker <jlbec@evilplan.org>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/ocfs2/aops.c