]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Merge branch 'fix-resource-leak-checks-for-tail-calls'
authorAlexei Starovoitov <ast@kernel.org>
Mon, 4 Nov 2024 00:52:06 +0000 (16:52 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 4 Nov 2024 00:52:06 +0000 (16:52 -0800)
Kumar Kartikeya Dwivedi says:

====================
Fix resource leak checks for tail calls

This set contains a fix for detecting unreleased RCU read locks or
unfinished preempt_disable sections when performing a tail call. Spin
locks are prevented by accident since they don't allow any function
calls, including tail calls (modelled as call instruction to a helper),
so we ensure they are checked as well, in preparation for relaxing
function call restricton for critical sections in the future.

Then, in the second patch, all the checks for reference leaks and locks
are unified into a single function that can be called from different
places. This unification patch is kept separate and placed after the fix
to allow independent backport of the fix to older kernels without a
depdendency on the clean up.

Naturally, this creates a divergence in the disparate error messages,
therefore selftests that rely on the exact error strings need to be
updated to match the new verifier log message.

A selftest is included to ensure no regressions occur wrt this behavior.
====================

Link: https://lore.kernel.org/r/20241103225940.1408302-1-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>

Trivial merge