Skip to content

Commit 2a37448

Browse files
namhyungopsiff
authored andcommitted
perf sched: Use RC_CHK_EQUAL() to compare pointers
[ Upstream commit 7a4002ec9e0fced907179da94f67c3082d7b4162 ] So that it can check two pointers to the same object properly when REFCNT_CHECKING is on. Fixes: 78c32f4 ("libperf rc_check: Add RC_CHK_EQUAL") Reviewed-by: Ian Rogers <[email protected]> Tested-by: Ian Rogers <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit f7786e6a4f9c2cfa4b778454df6340c90b410faa)
1 parent bfb2436 commit 2a37448

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/perf/builtin-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ thread_atoms_search(struct rb_root_cached *root, struct thread *thread,
999999
else if (cmp < 0)
10001000
node = node->rb_right;
10011001
else {
1002-
BUG_ON(thread != atoms->thread);
1002+
BUG_ON(!RC_CHK_EQUAL(thread, atoms->thread));
10031003
return atoms;
10041004
}
10051005
}

0 commit comments

Comments
 (0)