Re: [PATCH 2/2] perf/x86/intel/bts: Fix the use of page_private()
From: Alexander Shishkin
Date: Wed Dec 11 2019 - 01:26:18 EST
Peter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
>> static size_t buf_size(struct page *page)
>> {
>> - return 1 << (PAGE_SHIFT + page_private(page));
>> + return 1 << (PAGE_SHIFT + buf_nr_pages(page));
>
> Hurmph, shouldn't that be:
>
> return buf_nr_pages(page) * PAGE_SIZE;
>
> ?
True, that one's broken.