mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
rcu: Force boolean subscript for expedited stall warnings
The cpu_online() function can return values other than 0 and 1, which can result in subscript overflow when applied to a two-element array. This commit allows for this behavior by using "!!" on the return value from cpu_online() when used as a subscript. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
This commit is contained in:
parent
e2fd9d3584
commit
ec3833ed02
1 changed files with 1 additions and 1 deletions
|
@ -3808,7 +3808,7 @@ static void synchronize_sched_expedited_wait(struct rcu_state *rsp)
|
||||||
ndetected++;
|
ndetected++;
|
||||||
rdp = per_cpu_ptr(rsp->rda, cpu);
|
rdp = per_cpu_ptr(rsp->rda, cpu);
|
||||||
pr_cont(" %d-%c%c%c", cpu,
|
pr_cont(" %d-%c%c%c", cpu,
|
||||||
"O."[cpu_online(cpu)],
|
"O."[!!cpu_online(cpu)],
|
||||||
"o."[!!(rdp->grpmask & rnp->expmaskinit)],
|
"o."[!!(rdp->grpmask & rnp->expmaskinit)],
|
||||||
"N."[!!(rdp->grpmask & rnp->expmaskinitnext)]);
|
"N."[!!(rdp->grpmask & rnp->expmaskinitnext)]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue