Skip to content

Commit df4fe17

Browse files
committed
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Thomas Gleixner: "A single fix for vmalloc_fault() which uses p*d_huge() unconditionally whether CONFIG_HUGETLBFS is set or not. In case of CONFIG_HUGETLBFS=n this results in a crash as p*d_huge() returns 0 in that case" * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix vmalloc_fault to use pXd_large
2 parents d2149e1 + 18a9552 commit df4fe17

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/x86/mm/fault.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static noinline int vmalloc_fault(unsigned long address)
330330
if (!pmd_k)
331331
return -1;
332332

333-
if (pmd_huge(*pmd_k))
333+
if (pmd_large(*pmd_k))
334334
return 0;
335335

336336
pte_k = pte_offset_kernel(pmd_k, address);
@@ -475,7 +475,7 @@ static noinline int vmalloc_fault(unsigned long address)
475475
if (pud_none(*pud) || pud_pfn(*pud) != pud_pfn(*pud_ref))
476476
BUG();
477477

478-
if (pud_huge(*pud))
478+
if (pud_large(*pud))
479479
return 0;
480480

481481
pmd = pmd_offset(pud, address);
@@ -486,7 +486,7 @@ static noinline int vmalloc_fault(unsigned long address)
486486
if (pmd_none(*pmd) || pmd_pfn(*pmd) != pmd_pfn(*pmd_ref))
487487
BUG();
488488

489-
if (pmd_huge(*pmd))
489+
if (pmd_large(*pmd))
490490
return 0;
491491

492492
pte_ref = pte_offset_kernel(pmd_ref, address);

0 commit comments

Comments
 (0)