In the Linux kernel, the following vulnerability has been resolved:
bpf: Fix deadlock between rcutaskstrace and event_mutex.
Fix the following deadlock: CPU A freeevent() perfkprobedestroy() mutexlock(&eventmutex) perftraceeventunreg() synchronizercutaskstrace()
There are several paths where freeevent() grabs eventmutex and calls syncrcutaskstrace. Above is one such case.
CPU B bpfprogtestrunsyscall() rcureadlocktrace() bpfprogrunpinoncpu() bpfprogload() bpftracingfuncproto() tracesetclrevent() mutexlock(&eventmutex)
Delegate tracesetclr_event() to workqueue to avoid such lock dependency.