Commit febd668d authored by Paolo Bonzini's avatar Paolo Bonzini

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: default avatarWanpeng Li <kernellwp@gmail.com>
Tested-by: default avatarWanpeng Li <kernellwp@gmail.com>
Acked-by: default avatarDavidlohr Bueso <dave@stgolabs.net>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent cb953129
......@@ -31,7 +31,7 @@ static inline void rcuwait_init(struct rcuwait *w)
*/
static inline int rcuwait_active(struct rcuwait *w)
{
return !!rcu_dereference(w->task);
return !!rcu_access_pointer(w->task);
}
extern int rcuwait_wake_up(struct rcuwait *w);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment