From: Namhyung Kim Date: Thu, 3 Jul 2025 01:49:40 +0000 (-0700) Subject: perf sched: Use RC_CHK_EQUAL() to compare pointers X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7a4002ec9e0fced907179da94f67c3082d7b4162;p=users%2Fjedix%2Flinux-maple.git 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 Tested-by: Ian Rogers Link: https://lore.kernel.org/r/20250703014942.1369397-7-namhyung@kernel.org Signed-off-by: Namhyung Kim --- diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index a6eb0462dd5be..087d4eaba5f71 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; } }