summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLibin <huawei.libin@huawei.com>2013-09-11 14:20:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 17:21:57 -0700
commitedf125ced1bf525546c22ad3fd7cf8a6d6cd3339 (patch)
tree9bab2ce17acc1b708a18bfa62d0a81c0ad3e35d2 /fs
parent4b699f4816c81533b7a1ce2169ae223cca1393cf (diff)
mm/huge_memory.c: fix potential NULL pointer dereference
commit a8f531ebc33052642b4bd7b812eedf397108ce64 upstream. In collapse_huge_page() there is a race window between releasing the mmap_sem read lock and taking the mmap_sem write lock, so find_vma() may return NULL. So check the return value to avoid NULL pointer dereference. collapse_huge_page khugepaged_alloc_page up_read(&mm->mmap_sem) down_write(&mm->mmap_sem) vma = find_vma(mm, address) Signed-off-by: Libin <huawei.libin@huawei.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Reviewed-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Reviewed-by: Michal Hocko <mhocko@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions