mm-hugetlbc-add-null-check-of-return-value-of-huge_pte_offset.patch removed from -mm tree
Subsystems (2)
[email protected]
maintainerSubject: [merged] mm-hugetlbc-add-null-check-of-return-value-of-huge_pte_offset.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 08 Apr 2014 13:31:07 -0700
The patch titled
Subject: mm/hugetlb.c: add NULL check of return value of huge_pte_offset
has been removed from the -mm tree. Its filename was
mm-hugetlbc-add-null-check-of-return-value-of-huge_pte_offset.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Naoya Horiguchi <[email protected]>
Subject: mm/hugetlb.c: add NULL check of return value of huge_pte_offset
huge_pte_offset() could return NULL, so we need NULL check to avoid potential NULL pointer dereferences.
---
mm/hugetlb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
mm/hugetlb.c renamed from mm/hugetlb.c~mm-hugetlbc-add-null-check-of-return-value-of-huge_pte_offset +3 -2
@@ -2690,7 +2690,8 @@ retry_avoidcopy:BUG_ON (huge_pte_none (pte));spin_lock (ptl); ptep =huge_pte_offset (mm, address &huge_page_mask (h)); -if (likely (pte_same (huge_ptep_get (ptep), pte))) +if (likely (ptep && +pte_same (huge_ptep_get (ptep), pte))) goto retry_avoidcopy;/* * race occurs while re-acquiring page table
@@ -2734,7 +2735,7 @@ retry_avoidcopy:*/ spin_lock (ptl); ptep =huge_pte_offset (mm, address &huge_page_mask (h)); -if (likely (pte_same (huge_ptep_get (ptep), pte))) { +if (likely (ptep &&pte_same (huge_ptep_get (ptep), pte))) {ClearPagePrivate (new_page);/* Break COW */
_
Patches currently in -mm which might be from [email protected] are
origin.patch mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff.patch mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff-v2.patch mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff-v3.patch mm-hugetlbfs-fix-rmapping-for-anonymous-hugepages-with-page_pgoff-v3-fix.patch pagewalk-update-page-table-walker-core.patch pagewalk-update-page-table-walker-core-fix-end-address-calculation-in-walk_page_range.patch pagewalk-update-page-table-walker-core-fix-end-address-calculation-in-walk_page_range-fix.patch pagewalk-add-walk_page_vma.patch smaps-redefine-callback-functions-for-page-table-walker.patch clear_refs-redefine-callback-functions-for-page-table-walker.patch pagemap-redefine-callback-functions-for-page-table-walker.patch pagemap-redefine-callback-functions-for-page-table-walker-fix.patch numa_maps-redefine-callback-functions-for-page-table-walker.patch memcg-redefine-callback-functions-for-page-table-walker.patch arch-powerpc-mm-subpage-protc-use-walk_page_vma-instead-of-walk_page_range.patch pagewalk-remove-argument-hmask-from-hugetlb_entry.patch pagewalk-remove-argument-hmask-from-hugetlb_entry-fix.patch pagewalk-remove-argument-hmask-from-hugetlb_entry-fix-fix.patch mempolicy-apply-page-table-walker-on-queue_pages_range.patch mm-add-pte_present-check-on-existing-hugetlb_entry-callbacks.patch mm-pagewalkc-move-pte-null-check.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch