[lkml]   [2019]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: KCSAN: data-race in __alloc_file / __alloc_file
On Fri, Nov 8, 2019 at 10:02 AM Eric Dumazet <> 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.


 \ /
  Last update: 2019-11-08 19:14    [W:0.064 / U:19.832 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site