Subject: + mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch added to -mm tree To: wujianguo@xxxxxxxxxx,guohanjun@xxxxxxxxxx,kirill.shutemov@xxxxxxxxxxxxxxx,mgorman@xxxxxxx,n-horiguchi@xxxxxxxxxxxxx,qiuxishi@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 16 Dec 2013 15:01:50 -0800 The patch titled Subject: mm/hugetlb: check for pte NULL pointer in __page_check_address() has been added to the -mm tree. Its filename is mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Jianguo Wu <wujianguo@xxxxxxxxxx> Subject: mm/hugetlb: check for pte NULL pointer in __page_check_address() In __page_check_address(), if address's pud is not present, huge_pte_offset() will return NULL, we should check the return value. Signed-off-by: Jianguo Wu <wujianguo@xxxxxxxxxx> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Mel Gorman <mgorman@xxxxxxx> Cc: qiuxishi <qiuxishi@xxxxxxxxxx> Cc: Hanjun Guo <guohanjun@xxxxxxxxxx> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/rmap.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN mm/rmap.c~mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address mm/rmap.c --- a/mm/rmap.c~mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address +++ a/mm/rmap.c @@ -600,7 +600,11 @@ pte_t *__page_check_address(struct page spinlock_t *ptl; if (unlikely(PageHuge(page))) { + /* when pud is not present, pte will be NULL */ pte = huge_pte_offset(mm, address); + if (!pte) + return NULL; + ptl = huge_pte_lockptr(page_hstate(page), mm, pte); goto check; } _ Patches currently in -mm which might be from wujianguo@xxxxxxxxxx are mm-memory-failurec-recheck-pagehuge-after-hugetlb-page-migrate-successfully.patch mm-hugetlb-check-for-pte-null-pointer-in-__page_check_address.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html