Re: [PATCH] locking/osq_lock: fix a data race in osq_wait_next

From: Marco Elver
Date: Tue Jan 28 2020 - 05:29:25 EST


On Tue, 28 Jan 2020 at 11:10, Qian Cai <cai@xxxxxx> wrote:
>
>
>
> > On Jan 28, 2020, at 3:18 AM, Marco Elver <elver@xxxxxxxxxx> wrote:
> >
> > This should be an instance of same-value-store, since the node->cpu is
> > per-CPU and smp_processor_id() should always be the same, at least
> > once it's published. I believe the data race I observed here before
> > KCSAN had KCSAN_REPORT_VALUE_CHANGE_ONLY on syzbot, and hasn't been
> > observed since. For the most part, that should deal with this case.
>
> Are you sure? I had KCSAN_REPORT_VALUE_CHANGE_ONLY=y here and saw something similar a splat. Iâll also double check on my side and provide the decoding.

The data race you reported in this thread is a different one (same
function, but different accesses). I will reply separately.