diff options
author | Andy Lutomirski <luto@amacapital.net> | 2012-07-05 16:00:11 -0700 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-04-05 09:13:01 +0300 |
commit | 98f95f576ab386ad59338b064063da0cdb3a52ee (patch) | |
tree | 4b4c79e650c59a1dfe3cfc880597ec5dd8a2a5fc /drivers/cdrom/cdrom.c | |
parent | 7ab51a6f665a27d4f5cb62813fc75f339943e7f0 (diff) | |
download | kernel-mfld-blackbay-98f95f576ab386ad59338b064063da0cdb3a52ee.tar.gz kernel-mfld-blackbay-98f95f576ab386ad59338b064063da0cdb3a52ee.tar.bz2 kernel-mfld-blackbay-98f95f576ab386ad59338b064063da0cdb3a52ee.zip |
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 90ed52ebe481 ("[PATCH] holepunch: fix
mmap_sem i_mutex deadlock")
[bwh: Backported to 3.2:
- Adjust context
- madvise_remove() calls vmtruncate_range(), not do_fallocate()]
[luto: Backported to 3.0: Adjust context]
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: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/cdrom/cdrom.c')
0 files changed, 0 insertions, 0 deletions