]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:05:11 +0000 (12:05 +0200)
commitf8346dc1222382c88c863f861e8bb53ba32bf0a9
treec7d23af465664599663ef8b5866b875ace9c19d3
parentabf2f0c294e2df642346e92026c08bb8fd27df0f
perf/core: Don't leak AUX buffer refcount on allocation failure

commit 5468c0fbccbb9d156522c50832244a8b722374fb upstream.

Failure of the AUX buffer allocation leaks the reference count.

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

Fixes: 45bfb2e50471 ("perf/core: 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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/events/core.c