diff options
author | Libin <huawei.libin@huawei.com> | 2013-09-11 23:20:38 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 00:57:19 +0200 |
commit | a8f531ebc33052642b4bd7b812eedf397108ce64 (patch) | |
tree | eed956b9a3e7efa02937d984ae3f8d94810a478d /Documentation/usb | |
parent | mm: kill one if loop in __free_pages_bootmem() (diff) | |
download | linux-a8f531ebc33052642b4bd7b812eedf397108ce64.tar.xz linux-a8f531ebc33052642b4bd7b812eedf397108ce64.zip |
mm/huge_memory.c: fix potential NULL pointer dereference
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>
Cc: <stable@vger.kernel.org> # v3.0+
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/usb')
0 files changed, 0 insertions, 0 deletions