Messages in this thread | | | From | Linus Torvalds <> | Date | Fri, 8 Nov 2019 10:12:15 -0800 | Subject | Re: KCSAN: data-race in __alloc_file / __alloc_file |
| |
On Fri, Nov 8, 2019 at 10:02 AM Eric Dumazet <edumazet@google.com> wrote: > > Another interesting KCSAN report : > > static inline s64 percpu_counter_read_positive(struct percpu_counter *fbc) > { > s64 ret = fbc->count; // data-race ....
Yeah, I think that's fundamentally broken on 32-bit. It might need a sequence lock instead of that raw_spinlock_t to be sanely done properly on 32-bit.
Or we just admit that 32-bit doesn't really matter any more in the long run, and that this is not a problem in practice because the 32-bit overflow basically never happens on small machines anyway.
Linus
| |