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: 78c32f4cb1 ("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>
This commit is contained in:
Namhyung Kim 2025-07-02 18:49:40 -07:00
parent 117e5c33b1
commit 7a4002ec9e

View File

@ -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;
}
}