On Mon, Feb 6, 2023 at 7:58 AM Luis Chamberlain <mcgrof@xxxxxxxxxx> wrote: > > As for Linus' point about us needing to avoid sleep under RCU + > spinlock, curious if we can capture *existing* bad users of that with > Coccinelle SmPL. Well, we have it dynamically with the "might_sleep()" debugging. But that obviously only triggers if that is enabled and when those particular paths are run. It would be lovely to have a static checker for "sleep under spinlock or in RCU" (or any of the other situations: preemption disabled either explicitly or due to get_cpu() and similar). But I suspect it would be quite hard to do. Linus