summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorMike Rapoport (Microsoft) <rppt@kernel.org>2026-03-23 09:48:32 +0200
committerMike Rapoport (Microsoft) <rppt@kernel.org>2026-04-01 11:20:15 +0300
commitb8de9573e6aea8e0be666288ee4427eb07369187 (patch)
treea8249c60a85847553bdd714fcfb9c5828c157d16 /tools/perf/scripts/python
parent0510bdab538e2af07a67bc58a0c6c4547b83f8d5 (diff)
memblock: make free_reserved_area() more robust
There are two potential problems in free_reserved_area(): * it may free a page with not-existent buddy page * it may be passed a virtual address from an alias mapping that won't be properly translated by virt_to_page(), for example a symbol on arm64 While first issue is quite theoretical and the second one does not manifest itself because all the callers do the right thing, it is easy to make free_reserved_area() robust enough to avoid these potential issues. Replace the loop by virtual address with a loop by pfn that uses for_each_valid_pfn() and use __pa() or __pa_symbol() depending on the virtual mapping alias to correctly determine the loop boundaries. Link: https://patch.msgid.link/20260323074836.3653702-6-rppt@kernel.org Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions