]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: remap_file_pages: grab file ref to prevent race while mmaping
authorSasha Levin <sasha.levin@oracle.com>
Sat, 17 May 2014 13:19:30 +0000 (23:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 19 May 2014 07:35:05 +0000 (17:35 +1000)
commitd391cbb06dcf54321078cd5b9b3f56c80f221d09
tree7f6d46ed5cdb2cbfc010799f198ec25542ac71bd
parentf5759f3baaae8f5ef3e5004744b87200e5732d5b
mm: remap_file_pages: grab file ref to prevent race while mmaping

A file reference should be held while a file is mmaped, otherwise it might
be freed while being used.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Suggested-by: Hugh Dickins <hughd@google.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c