diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2025-08-06 04:41:21 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2025-08-06 04:41:21 +0300 |
commit | adf12a394c8eb4b857b8f70cc6594a9ab25e3fc6 (patch) | |
tree | 28f42ac3595174de2897928fc1771844bcc6a94f /kernel/locking/mutex-debug.c | |
parent | 8466d393700f9ccef68134d3349f4e0a087679b9 (diff) | |
parent | 084d2ac4030c5919e85bba1f4af26e33491469cb (diff) |
Merge tag 'perf-fixes-27504' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
Pull perf fixes from Thomas Gleixner:
"Perf fixes for perf_mmap() reference counting to prevent potential
reference count leaks which are caused by:
- VMA splits, which change the offset or size of a mapping, which
causes perf_mmap_close() to ignore the unmap or unmap the wrong
buffer.
- Several internal issues of perf_mmap(), which can cause reference
count leaks in the perf mmap, corrupt accounting or cause leaks in
perf drivers.
The main fix is to prevent VMA splits by implementing the
[may_]split() callback for vm operations.
The other issues are addressed by rearranging code, early returns on
failure and invocation of cleanups.
Also provide a selftest to validate the fixes.
The reference counting should be converted to refcount_t, but that
requires larger refactoring of the code and will be done once these
fixes are upstream"
* tag 'perf-fixes-27504' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git:
selftests/perf_events: Add a mmap() correctness test
perf/core: Prevent VMA split of buffer mappings
perf/core: Handle buffer mapping fail correctly in perf_mmap()
perf/core: Exit early on perf_mmap() fail
perf/core: Don't leak AUX buffer refcount on allocation failure
perf/core: Preserve AUX buffer allocation failure result
Diffstat (limited to 'kernel/locking/mutex-debug.c')
0 files changed, 0 insertions, 0 deletions