perf namespace: Protect reading thread's namespace
authorNamhyung Kim <namhyung@kernel.org>
Wed, 22 May 2019 05:32:48 +0000 (14:32 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 28 May 2019 12:52:23 +0000 (09:52 -0300)
commit6584140ba9e6762dd7ec73795243289b914f31f9
tree6fe8c8903c16a4a1f296530c7bd7523f824013e4
parent9903c64f0fe7fa4829c948fa0e742f578e084548
perf namespace: Protect reading thread's namespace

It seems that the current code lacks holding the namespace lock in
thread__namespaces().  Otherwise it can see inconsistent results.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Hari Bathini <hbathini@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Krister Johansen <kjlx@templeofstupid.com>
Link: http://lkml.kernel.org/r/20190522053250.207156-2-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/thread.c