[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wg=6amjgu3UiJX8HcNN9z-jqCRg=P=T4ZytFap2fgAdgw@mail.gmail.com>
Date: Mon, 6 Feb 2023 08:07:07 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Luis Chamberlain <mcgrof@...nel.org>
Cc: Julia Lawall <julia.lawall@...ia.fr>,
Hongchen Zhang <zhanghongchen@...ngson.cn>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andrew Morton <akpm@...ux-foundation.org>,
"Christian Brauner (Microsoft)" <brauner@...nel.org>,
David Howells <dhowells@...hat.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Eric Dumazet <edumazet@...gle.com>,
"Fabio M. De Francesco" <fmdefrancesco@...il.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
maobibo <maobibo@...ngson.cn>,
Matthew Wilcox <willy@...radead.org>,
Sedat Dilek <sedat.dilek@...il.com>
Subject: Re: [PATCH v4] pipe: use __pipe_{lock,unlock} instead of spinlock
On Mon, Feb 6, 2023 at 7:58 AM Luis Chamberlain <mcgrof@...nel.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
Powered by blists - more mailing lists