perf/core: Don't leak AUX buffer refcount on allocation failure
authorThomas Gleixner <tglx@linutronix.de>
Sat, 2 Aug 2025 10:39:39 +0000 (12:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 5 Aug 2025 19:55:29 +0000 (21:55 +0200)
commit5468c0fbccbb9d156522c50832244a8b722374fb
tree279ffe5fe42df3486392902972a95d3b96ff7322
parent54473e0ef849f44e5ee43e6d6746c27030c3825b
perf/core: Don't leak AUX buffer refcount on allocation failure

Failure of the AUX buffer allocation leaks the reference count.

Set the reference count to 1 only when the allocation succeeds.

Fixes: 45bfb2e50471 ("perf: Add AUX area to ring buffer for raw data streams")
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