In the Linux kernel, the following vulnerability has been resolved: perf/core: Add RCU read lock protection to perfiteratectx() The perfiteratectx() function performs RCU list traversal but currently lacks RCU read lock protection. This causes lockdep warnings when running perf probe with unshare(1) under CONFIGPROVERCULIST=y: WARNING: suspicious RCU usage kernel/events/core.c:8168 RCU-list traversed in non-reader section!! Call Trace: lockdeprcususpicious ? perfeventaddrfiltersapply perfiteratectx perfeventexec beginnewexec ? loadelfphdrs loadelfbinary ? lockacquire ? findheldlock ? bprmexecve bprmexecve doexecveatcommon.isra.0 _x64sysexecve dosyscall64 entrySYSCALL64afterhwframe This protection was previously present but was removed in commit bd2756811766 ("perf: Rewrite core context handling"). Add back the necessary rcureadlock()/rcureadunlock() pair around perfiteratectx() call in perfeventexec(). [ mingo: Use scopedguard() as suggested by Peter ]