Skip to content
Commit 6a24474d authored by Tejun Heo's avatar Tejun Heo
Browse files

percpu-refcount: consistently use plain (non-sched) RCU



percpu_ref_get/put() are using preempt_disable/enable() while
percpu_ref_kill() is using plain call_rcu() instead of
call_rcu_sched().  This is buggy as grace periods of the two may not
match.  Fix it by using plain RCU in percpu_ref_get/put().

(I suggested using sched RCU in the first place but there's no actual
 benefit in doing so unless we're gonna introduce different variants
 of get/put to be called while preemption is alredy disabled, which we
 definitely shouldn't.)

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Reported-by: default avatarRusty Russell <rusty@rustcorp.com.au>
Acked-by: default avatarKent Overstreet <koverstreet@google.com>
parent c1ae6e9b
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