Files
ubports_kernel_google_msm/mm
Andy Lutomirski 6e153e476e mm: Hold a file reference in madvise_remove
commit 9ab4233dd08036fe34a89c7dc6f47a8bf2eb29eb upstream.

Otherwise the code races with munmap (causing a use-after-free
of the vma) or with close (causing a use-after-free of the struct
file).

The bug was introduced by commit 90ed52ebe4 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")

Cc: Hugh Dickins <hugh@veritas.com>
Cc: Miklos Szeredi <mszeredi@suse.cz>
Cc: Badari Pulavarty <pbadari@us.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[bwh: Backported to 3.2:
 - Adjust context
 - madvise_remove() calls vmtruncate_range(), not do_fallocate()]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15 17:09:29 -07:00
..
2013-03-15 17:06:38 -07:00
2012-01-03 22:54:56 -05:00
2013-03-07 15:23:35 -08:00
2013-03-15 17:06:38 -07:00
2012-04-21 01:58:20 -04:00
2012-04-21 01:58:20 -04:00
2012-01-20 09:23:16 -08:00
2012-04-25 21:26:33 -07:00