|
@@ -3396,7 +3396,7 @@ int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
* run pte_offset_map on the pmd, if an huge pmd could
|
|
* run pte_offset_map on the pmd, if an huge pmd could
|
|
* materialize from under us from a different thread.
|
|
* materialize from under us from a different thread.
|
|
*/
|
|
*/
|
|
- if (unlikely(__pte_alloc(mm, vma, pmd, address)))
|
|
|
|
|
|
+ if (unlikely(pmd_none(*pmd)) && __pte_alloc(mm, vma, pmd, address))
|
|
return VM_FAULT_OOM;
|
|
return VM_FAULT_OOM;
|
|
/* if an huge pmd materialized from under us just retry later */
|
|
/* if an huge pmd materialized from under us just retry later */
|
|
if (unlikely(pmd_trans_huge(*pmd)))
|
|
if (unlikely(pmd_trans_huge(*pmd)))
|