]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
perf namespace: Protect reading thread's namespace
authorNamhyung Kim <namhyung@kernel.org>
Wed, 22 May 2019 05:32:48 +0000 (14:32 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Jun 2019 06:15:19 +0000 (08:15 +0200)
commitbe0e62666da159dcbabe61c90e1056f2b964046f
tree43a6f942fccebcb1dcfcec3ea86c8fe0a5673374
parent7d523e33f4b6fce626577075d188419081bef2b0
perf namespace: Protect reading thread's namespace

[ Upstream commit 6584140ba9e6762dd7ec73795243289b914f31f9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/util/thread.c