[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87o6sm81wt.ffs@tglx>
Date: Mon, 11 Aug 2025 14:42:58 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linus Torvalds
<torvalds@...uxfoundation.org>, Ingo Molnar <mingo@...nel.org>, Namhyung
Kim <namhyung@...nel.org>, Arnaldo Carvalho de Melo <acme@...hat.com>,
Lorenzo Stoakes <lorenzo.stoakes@...cle.com>, Kees Cook <kees@...nel.org>
Subject: Re: [patch V2 m@/6] perf/core: Split out mlock limit handling
On Mon, Aug 11 2025 at 12:49, Peter Zijlstra wrote:
> On Mon, Aug 11, 2025 at 09:06:37AM +0200, Thomas Gleixner wrote:
>> To prepare for splitting the buffer allocation out into seperate functions
>> for the ring buffer and the AUX buffer, split out mlock limit handling into
>> a helper function, which can be called from both.
>>
>> No functional change intended.
>>
>> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
>> Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
>>
>> ---
>
> Does this not also need this? I found this stray user_extra when I
> eventually removed the local user_extra variable.
>
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -6997,8 +6997,6 @@ static int perf_mmap(struct file *file,
> if (vma_size != PAGE_SIZE * nr_pages)
> return -EINVAL;
>
> - user_extra = nr_pages;
> -
> mutex_lock(&event->mmap_mutex);
> ret = -EINVAL;
>
No. That's how user_extra is initialized in the first place.
To remove that nr_pages must become an argument to that function.
Powered by blists - more mailing lists