aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2025-07-02 18:49:40 -0700
committerNamhyung Kim <namhyung@kernel.org>2025-07-03 11:43:16 -0700
commit7a4002ec9e0fced907179da94f67c3082d7b4162 (patch)
tree41a005db85947a9a755545b1d5c555614f9f2729 /tools/perf
parentperf sched: Fix memory leaks for evsel->priv in timehist (diff)
downloadlinux-7a4002ec9e0fced907179da94f67c3082d7b4162.tar.gz
linux-7a4002ec9e0fced907179da94f67c3082d7b4162.zip
perf sched: Use RC_CHK_EQUAL() to compare pointers
So that it can check two pointers to the same object properly when REFCNT_CHECKING is on. Fixes: 78c32f4cb12f9430 ("libperf rc_check: Add RC_CHK_EQUAL") Reviewed-by: Ian Rogers <irogers@google.com> Tested-by: Ian Rogers <irogers@google.com> Link: https://lore.kernel.org/r/20250703014942.1369397-7-namhyung@kernel.org Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/builtin-sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index a6eb0462dd5b..087d4eaba5f7 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -994,7 +994,7 @@ thread_atoms_search(struct rb_root_cached *root, struct thread *thread,
else if (cmp < 0)
node = node->rb_right;
else {
- BUG_ON(thread != atoms->thread);
+ BUG_ON(!RC_CHK_EQUAL(thread, atoms->thread));
return atoms;
}
}