perf thread: Ensure comm_lock held for comm_list
authorIan Rogers <irogers@google.com>
Thu, 29 May 2025 19:22:06 +0000 (12:22 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Wed, 11 Jun 2025 20:40:31 +0000 (13:40 -0700)
commitae0756933e879a703e1a5deb701d9ec88b032ba3
tree5370c2348a6d53b54439ccdad02b748d57d589f4
parent1190410772090a68995a758c979ba44b986e2df2
perf thread: Ensure comm_lock held for comm_list

Add thread safety annotations for comm_list and add locking for two
instances where the list is accessed without the lock held (in
contradiction to ____thread__set_comm()).

Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250529192206.971199-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/util/comm.c
tools/perf/util/thread.c
tools/perf/util/thread.h