Re: [PATCH V9 1/4] perf/core: Add PERF_SAMPLE_DATA_PAGE_SIZE

From: Peter Zijlstra
Date: Fri Oct 09 2020 - 05:16:51 EST


On Fri, Oct 09, 2020 at 11:09:27AM +0200, Peter Zijlstra wrote:
> @@ -7046,6 +7059,10 @@ static u64 __perf_get_page_size(struct m
> return 0;
> }
>
> + page = pte_page(*pte);
> + if (PageHuge(page))
> + return page_size(compound_head(page));

Argh, this misses pte_unmap()..

> +
> pte_unmap(pte);
> return PAGE_SIZE;
> }