Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
forked fromtorvalds/linux

Commit18a9552

Browse files
toshikaniKAGA-KOKO
authored andcommitted
x86/mm: Fix vmalloc_fault to use pXd_large
Gratian Crisan reported that vmalloc_fault() crashes when CONFIG_HUGETLBFSis not set since the function inadvertently uses pXn_huge(), which alwaysreturn 0 in this case. ioremap() does not depend on CONFIG_HUGETLBFS.Fix vmalloc_fault() to call pXd_large() instead.Fixes:f4eafd8 ("x86/mm: Fix vmalloc_fault() to handle large pages properly")Reported-by: Gratian Crisan <gratian.crisan@ni.com>Signed-off-by: Toshi Kani <toshi.kani@hpe.com>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>Cc: stable@vger.kernel.orgCc: linux-mm@kvack.orgCc: Borislav Petkov <bp@alien8.de>Cc: Andy Lutomirski <luto@kernel.org>Link:https://lkml.kernel.org/r/20180313170347.3829-2-toshi.kani@hpe.com
1 parentfc6eabb commit18a9552

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
return0;
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
return0;
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
return0;
491491

492492
pte_ref=pte_offset_kernel(pmd_ref,address);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp