Fix a bug in synchronize RCU when the calling thread is bound to a CPU.
Set "td_pinned" to zero after "sched_unbind()" to prevent "td_pinned" from temporarily becoming negative during "sched_bind()". This can happen if "sched_bind()" uses "sched_pin()" and "sched_unpin()". MFC after: 1 week Sponsored by: Mellanox Technologies
This commit is contained in:
parent
8a8a9c9b61
commit
a77f17c5a9
@ -299,8 +299,9 @@ linux_synchronize_rcu(void)
|
||||
old_cpu = PCPU_GET(cpuid);
|
||||
old_pinned = td->td_pinned;
|
||||
old_prio = td->td_priority;
|
||||
td->td_pinned = 0;
|
||||
was_bound = sched_is_bound(td);
|
||||
sched_unbind(td);
|
||||
td->td_pinned = 0;
|
||||
sched_bind(td, old_cpu);
|
||||
|
||||
ck_epoch_synchronize_wait(&linux_epoch,
|
||||
|
Loading…
x
Reference in New Issue
Block a user