Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mm: Hold a file reference in madvise_remove
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 90ed52e ("[PATCH] holepunch: fix mmap_sem i_mutex deadlock") Cc: Hugh Dickins <[email protected]> Cc: Miklos Szeredi <[email protected]> Cc: Badari Pulavarty <[email protected]> Cc: Nick Piggin <[email protected]> Cc: [email protected] Signed-off-by: Andy Lutomirski <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information