]> git.ipfire.org Git - thirdparty/linux.git/commit
perf/core: Preserve AUX buffer allocation failure result
authorThomas Gleixner <tglx@linutronix.de>
Mon, 4 Aug 2025 20:22:09 +0000 (22:22 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 5 Aug 2025 19:55:28 +0000 (21:55 +0200)
commit54473e0ef849f44e5ee43e6d6746c27030c3825b
treef03c6194cc4a47a9da57d0cd364ad6b09bbeeb19
parent7e161a991ea71e6ec526abc8f40c6852ebe3d946
perf/core: Preserve AUX buffer allocation failure result

A recent overhaul sets the return value to 0 unconditionally after the
allocations, which causes reference count leaks and corrupts the user->vm
accounting.

Preserve the AUX buffer allocation failure return value, so that the
subsequent code works correctly.

Fixes: 0983593f32c4 ("perf/core: Lift event->mmap_mutex in perf_mmap()")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: stable@vger.kernel.org
kernel/events/core.c