Re: KCSAN: data-race in __alloc_file / __alloc_file

From: Linus Torvalds
Date: Mon Nov 11 2019 - 15:44:10 EST


On Mon, Nov 11, 2019 at 11:13 AM Eric Dumazet <edumazet@xxxxxxxxxx> wrote:
>
> What about this other one, it looks like multiple threads can
> manipulate tsk->min_flt++; at the same time in faultin_page()

Yeah, maybe we could have some model for marking "this is statistics,
doesn't need to be exact".

> Should we not care, or should we mirror min_flt with a second
> atomic_long_t, or simply convert min_flt to atomic_long_t ?

Definitely not make it atomic. Those are expensive, and there's no point.

Linus