Messages in this thread | | | From | Linus Torvalds <> | Date | Mon, 6 Feb 2023 08:07:07 -0800 | Subject | Re: [PATCH v4] pipe: use __pipe_{lock,unlock} instead of spinlock |
| |
On Mon, Feb 6, 2023 at 7:58 AM Luis Chamberlain <mcgrof@kernel.org> 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
| |