ext4: fix possible use-after-free with AIO
authorJan Kara <jack@suse.cz>
Wed, 30 Jan 2013 03:48:17 +0000 (22:48 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 30 Jan 2013 03:48:17 +0000 (22:48 -0500)
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.

CC: stable@vger.kernel.org
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Acked-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

No differences found