Re: [bug report] perf: Fix event leak upon exec and file release
From: Dan Carpenter
Date: Wed Oct 02 2024 - 10:57:46 EST
On Wed, Oct 02, 2024 at 03:51:41PM +0200, Frederic Weisbecker wrote:
> So this should be fine (famous last words). There is a might_sleep() call in
> irq_work_sync() that should tell us about it.
Thanks for looking at this, Frederic.
I don't know that the might_sleep() helps us very much... In my experience very
few people know about or enable CONFIG_DEBUG_ATOMIC_SLEEP. It used to be much
more common to enable this back in the day. Twenty years ago Linux kernels
would deadlock more often than they do now. Lockdep and static checkers have
helped a lot. People back then only had one processor so sleeping in atomic
would lead lead to deadlocks more often than it does now where the kernel can
reschedule the sleeping task on a different CPU.
With the realtime kernel, I kind of expect sleeping in atomic to become a common
bug for a while so probably people should start enabling it again.
regards,
dan carpenter