diff options
author | 2019-03-11 17:28:03 +0530 | |
---|---|---|
committer | 2019-03-26 14:38:38 -0700 | |
commit | b699cce1604e828f19c39845252626eb78cdf38a (patch) | |
tree | 3eb0b208e27808f54c02fc306407583ab4e7c91d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | rcu: Default jiffies_to_sched_qs to jiffies_till_sched_qs (diff) | |
download | linux-dev-b699cce1604e828f19c39845252626eb78cdf38a.tar.xz linux-dev-b699cce1604e828f19c39845252626eb78cdf38a.zip |
rcu: Do a single rhp->func read in rcu_head_after_call_rcu()
The rcu_head_after_call_rcu() function reads the rhp->func pointer twice,
which can result in a false-positive WARN_ON_ONCE() if the callback
were passed to call_rcu() between the two reads. Although racing
rcu_head_after_call_rcu() with call_rcu() is to be a dubious use case
(the return value is not reliable in that case), intermittent and
irreproducible warnings are also quite dubious. This commit therefore
uses a single READ_ONCE() to pick up the value of rhp->func once, then
tests that value twice, thus guaranteeing consistent processing within
rcu_head_after_call_rcu()().
Neverthless, racing rcu_head_after_call_rcu() with call_rcu() is still
a dubious use case.
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
[ paulmck: Add blank line after declaration per checkpatch.pl. ]
Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions