lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a88f4150-d75d-4412-929f-ef937019a7f9@lucifer.local>
Date: Wed, 13 Aug 2025 06:56:40 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, linux-kernel@...r.kernel.org,
        torvalds@...uxfoundation.org, mingo@...nel.org, namhyung@...nel.org,
        acme@...hat.com, kees@...nel.org
Subject: Re: [PATCH v3 07/15] perf: Remove redundant aux_unlock label

On Tue, Aug 12, 2025 at 12:39:05PM +0200, Peter Zijlstra wrote:
> unlock and aux_unlock are now identical, remove the aux_unlock one.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>

And in classic fashion, of course you addressed my comment from the last
patch in the very next one :P

LGTM, so:

Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>

> ---
>  kernel/events/core.c |   17 ++++++++---------
>  1 file changed, 8 insertions(+), 9 deletions(-)
>
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -7095,7 +7095,7 @@ static int perf_mmap(struct file *file,
>
>  		rb = event->rb;
>  		if (!rb)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		aux_mutex = &rb->aux_mutex;
>  		mutex_lock(aux_mutex);
> @@ -7104,27 +7104,27 @@ static int perf_mmap(struct file *file,
>  		aux_size = READ_ONCE(rb->user_page->aux_size);
>
>  		if (aux_offset < perf_data_size(rb) + PAGE_SIZE)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		if (aux_offset != vma->vm_pgoff << PAGE_SHIFT)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		/* already mapped with a different offset */
>  		if (rb_has_aux(rb) && rb->aux_pgoff != vma->vm_pgoff)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		if (aux_size != nr_pages * PAGE_SIZE)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		/* already mapped with a different size */
>  		if (rb_has_aux(rb) && rb->aux_nr_pages != nr_pages)
> -			goto aux_unlock;
> +			goto unlock;
>
>  		if (!is_power_of_2(nr_pages))
> -			goto aux_unlock;
> +			goto unlock;
>
>  		if (!atomic_inc_not_zero(&rb->mmap_count))
> -			goto aux_unlock;
> +			goto unlock;
>
>  		if (rb_has_aux(rb)) {
>  			atomic_inc(&rb->aux_mmap_count);
> @@ -7158,7 +7158,6 @@ static int perf_mmap(struct file *file,
>  	}
>
>  unlock:
> -aux_unlock:
>  	if (aux_mutex)
>  		mutex_unlock(aux_mutex);
>  	mutex_unlock(&event->mmap_mutex);
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ