diff options
author | Uladzislau Rezki (Sony) <[email protected]> | 2024-11-13 12:00:08 +0100 |
---|---|---|
committer | Frederic Weisbecker <[email protected]> | 2024-11-15 22:23:50 +0100 |
commit | 812a1c3b9f7c36d9255f0d29d0a3d324e2f52321 (patch) | |
tree | 7c4e709316c88998e074416f84a013fb5d6d2bca /tools/perf/scripts/python/parallel-perf.py | |
parent | 80e935c8c154d8fbdd85a20d89b4962662ceddd7 (diff) |
rcuscale: Do a proper cleanup if kfree_scale_init() fails
A static analyzer for C, Smatch, reports and triggers below
warnings:
kernel/rcu/rcuscale.c:1215 rcu_scale_init()
warn: inconsistent returns 'global &fullstop_mutex'.
The checker complains about, we do not unlock the "fullstop_mutex"
mutex, in case of hitting below error path:
<snip>
...
if (WARN_ON_ONCE(jiffies_at_lazy_cb - jif_start < 2 * HZ)) {
pr_alert("ERROR: call_rcu() CBs are not being lazy as expected!\n");
WARN_ON_ONCE(1);
return -1;
^^^^^^^^^^
...
<snip>
it happens because "-1" is returned right away instead of
doing a proper unwinding.
Fix it by jumping to "unwind" label instead of returning -1.
Reported-by: Dan Carpenter <[email protected]>
Reviewed-by: Paul E. McKenney <[email protected]>
Reviewed-by: Neeraj Upadhyay <[email protected]>
Closes: https://lore.kernel.org/rcu/ZxfTrHuEGtgnOYWp@pc636/T/
Fixes: 084e04fff160 ("rcuscale: Add laziness and kfree tests")
Signed-off-by: Uladzislau Rezki (Sony) <[email protected]>
Signed-off-by: Frederic Weisbecker <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/parallel-perf.py')
0 files changed, 0 insertions, 0 deletions