diff options
| author | Muchun Song <[email protected]> | 2023-07-07 11:38:59 +0800 |
|---|---|---|
| committer | Andrew Morton <[email protected]> | 2023-08-18 10:12:14 -0700 |
| commit | 3ce2c24cb68f228590a053d6058a5901cd31af61 (patch) | |
| tree | 4f21e8ea3a9ad59fb2d0ebfce568cdc69e4f8148 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | c200a7119bc7dc9430e8287563e5343b154ff9d0 (diff) | |
mm: hugetlb_vmemmap: fix a race between vmemmap pmd split
The local variable @page in __split_vmemmap_huge_pmd() to obtain a pmd
page without holding page_table_lock may possiblely get the page table
page instead of a huge pmd page.
The effect may be in set_pte_at() since we may pass an invalid page
struct, if set_pte_at() wants to access the page struct (e.g.
CONFIG_PAGE_TABLE_CHECK is enabled), it may crash the kernel.
So fix it. And inline __split_vmemmap_huge_pmd() since it only has one
user.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: d8d55f5616cf ("mm: sparsemem: use page table lock to protect kernel pmd operations")
Signed-off-by: Muchun Song <[email protected]>
Cc: Mike Kravetz <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions