From: Arnaldo Carvalho de Melo Date: Fri, 15 May 2015 18:32:55 +0000 (-0300) Subject: perf machine: Stop accessing atomic_t::counter directly X-Git-Tag: v4.9.8~4119^2~43^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=59a51c1dc9fbb3fb4af928b852d7b35df83edd74;p=platform%2Fkernel%2Flinux-rpi3.git perf machine: Stop accessing atomic_t::counter directly Use atomic_read(&counter) instead. Cc: Adrian Hunter Cc: Borislav Petkov Cc: David Ahern Cc: Don Zickus Cc: Frederic Weisbecker Cc: Jiri Olsa Cc: Namhyung Kim Cc: Stephane Eranian Link: http://lkml.kernel.org/n/tip-k3hvfvpaut8wp02lzq27muhb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index 34bf89f..daa5591 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -1311,7 +1311,7 @@ static void __machine__remove_thread(struct machine *machine, struct thread *th, if (machine->last_match == th) machine->last_match = NULL; - BUG_ON(th->refcnt.counter == 0); + BUG_ON(atomic_read(&th->refcnt) == 0); if (lock) pthread_rwlock_wrlock(&machine->threads_lock); rb_erase(&th->rb_node, &machine->threads);