Re: [GIT PULL] fixes for v5.8-rc4

From: Linus Torvalds
Date: Fri Jul 03 2020 - 01:45:45 EST


On Thu, Jul 2, 2020 at 1:51 PM Christian Brauner
<christian.brauner@xxxxxxxxxx> wrote:
>
> A few comments on this since doing a grep data_race() reveals that currently
> only kernel/rcu/* is making use of this new annotation and this seems to be the
> first annotation in core kernel: when this was first sent to me I was obviously
> aware of the existence of KCSAN but not whether we had established a consenus
> around annotating places in the (core) kernel where we currently have benign
> data races that KCSAN complains about. I don't know whether we have reached a
> consensus in general yet or we're just doing this subsystem specific.

I'm not sure there's any consensus, and it depends on the quality of
the KCSAN bug reports (and the reporters). There were some KCSAN
reports that seemed to not actually be real data races as much as
"KCSAN was being stupid and not understanding idempotent value
setting".

It also depends on the quality of the patch and the description. If
KCSAN patches end up being "just shut up the tool", I will stop taking
them.

But in this case, as you say, we already had the comment about the
situation, and telling the tool about it obviously won't hurt.

Linus