aboutsummaryrefslogtreecommitdiff
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorLibin <huawei.libin@huawei.com>2013-09-11 14:20:38 -0700
committerBen Hutchings <ben@decadent.org.uk>2013-10-26 21:06:03 +0100
commit56cbe7f7ee88a2eb06226ab3b5b4333fe0df663f (patch)
treef8535ed6256cf152fb95324cd499a3552ae14817 /scripts/patch-kernel
parent89b2cd31a07fcee833fd0284eaeb7d57419a698f (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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions