lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 19 May 2020 08:34:24 +0800 From: Wanpeng Li <kernellwp@...il.com> To: Paolo Bonzini <pbonzini@...hat.com> Cc: Davidlohr Bueso <dave@...olabs.net>, Thomas Gleixner <tglx@...utronix.de>, Peter Zijlstra <peterz@...radead.org>, Marc Zyngier <maz@...nel.org>, Sebastian Sewior <bigeasy@...utronix.de>, Steven Rostedt <rostedt@...dmis.org>, Linus Torvalds <torvalds@...ux-foundation.org>, will@...nel.org, joel@...lfernandes.org, LKML <linux-kernel@...r.kernel.org>, kvm <kvm@...r.kernel.org>, Davidlohr Bueso <dbueso@...e.de> Subject: Re: [PATCH 4/5] rcuwait: Introduce rcuwait_active() On Mon, 18 May 2020 at 18:36, Paolo Bonzini <pbonzini@...hat.com> wrote: > > On 24/04/20 07:48, Davidlohr Bueso wrote: > > +/* > > + * Note: this provides no serialization and, just as with waitqueues, > > + * requires care to estimate as to whether or not the wait is active. > > + */ > > +static inline int rcuwait_active(struct rcuwait *w) > > +{ > > + return !!rcu_dereference(w->task); > > +} > > This needs to be changed to rcu_access_pointer: > > > --------------- 8< ----------------- > From: Paolo Bonzini <pbonzini@...hat.com> > Subject: [PATCH] rcuwait: avoid lockdep splats from rcuwait_active() > > rcuwait_active only returns whether w->task is not NULL. This is > exactly one of the usecases that are mentioned in the documentation > for rcu_access_pointer() where it is correct to bypass lockdep checks. > > This avoids a splat from kvm_vcpu_on_spin(). > > Reported-by: Wanpeng Li <kernellwp@...il.com> > Cc: Peter Zijlstra <peterz@...radead.org> > Signed-off-by: Paolo Bonzini <pbonzini@...hat.com> Tested-by: Wanpeng Li <wanpengli@...cent.com>
Powered by blists - more mailing lists