diff options
| author | Vishal Moola (Oracle) <[email protected]> | 2023-02-13 13:43:24 -0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-02-13 15:54:26 -0800 |
| commit | f528260b1a7d52140dfeb58857e13fc98ac193ef (patch) | |
| tree | 018eac4795456d7cc525171c586d9d8ef3472f0e /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | f67d6b26649379f8520abe6a6c7ed335310bf01e (diff) | |
mm/khugepaged: fix invalid page access in release_pte_pages()
release_pte_pages() converts from a pfn to a folio by using pfn_folio().
If the pte is not mapped, pfn_folio() will result in undefined behavior
which ends up causing a kernel panic[1].
Only call pfn_folio() once we have validated that the pte is both valid
and mapped to fix the issue.
[1] https://lore.kernel.org/linux-mm/[email protected]/
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Vishal Moola (Oracle) <[email protected]>
Fixes: 9bdfeea46f49 ("mm/khugepaged: convert release_pte_pages() to use folios")
Reported-by: Marek Szyprowski <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Debugged-by: Alexandre Ghiti <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions