From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ingo Molnar <mingo@kernel.org>, Thomas Gleixner <tglx@linutronix.de>
Cc: Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Clark Williams <williams@redhat.com>,
linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Bo YU <tsu.yubo@gmail.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Martin KaFai Lau <kafai@fb.com>,
Peter Zijlstra <peterz@infradead.org>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
bpf@vger.kernel.org, netdev@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>
Subject: [PATCH 01/11] perf bpf: Return value with unlocking in perf_env__find_btf()
Date: Thu, 2 May 2019 20:25:23 -0400 [thread overview]
Message-ID: <20190503002533.29359-2-acme@kernel.org> (raw)
In-Reply-To: <20190503002533.29359-1-acme@kernel.org>
From: Bo YU <tsu.yubo@gmail.com>
In perf_env__find_btf(), we're returning without unlocking
"env->bpf_progs.lock". There may be cause lockdep issue.
Detected by CoversityScan, CID# 1444762:(program hangs(LOCK))
Signed-off-by: Bo YU <tsu.yubo@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Martin KaFai Lau <kafai@fb.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Song Liu <songliubraving@fb.com>
Cc: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org
Cc: netdev@vger.kernel.org
Fixes: 2db7b1e0bd49d: (perf bpf: Return NULL when RB tree lookup fails in perf_env__find_btf())
Link: http://lkml.kernel.org/r/20190422080138.10088-1-tsu.yubo@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/env.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/env.c b/tools/perf/util/env.c
index 9494f9dc61ec..6a3eaf7d9353 100644
--- a/tools/perf/util/env.c
+++ b/tools/perf/util/env.c
@@ -115,8 +115,8 @@ struct btf_node *perf_env__find_btf(struct perf_env *env, __u32 btf_id)
}
node = NULL;
- up_read(&env->bpf_progs.lock);
out:
+ up_read(&env->bpf_progs.lock);
return node;
}
--
2.20.1
next prev parent reply other threads:[~2019-05-03 0:26 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-03 0:25 [GIT PULL 00/11] perf/urgent fixes Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo [this message]
2019-05-03 0:25 ` [PATCH 02/11] tools uapi x86: Sync vmx.h with the kernel Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 03/11] perf annotate: Fix build on 32 bit for BPF annotation Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 04/11] tools lib traceevent: Change tag string for error Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 05/11] perf bench numa: Add define for RUSAGE_THREAD if not present Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 06/11] perf report: Report OOM in status line in the GTK UI Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 07/11] perf cs-etm: Don't check cs_etm_queue::prev_packet validity Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 08/11] perf cs-etm: Always allocate memory for cs_etm_queue::prev_packet Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 09/11] tools build: Add -ldl to the disassembler-four-args feature test Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 10/11] tools arch uapi: Copy missing unistd.h headers for arc, hexagon and riscv Arnaldo Carvalho de Melo
2019-05-03 0:25 ` Arnaldo Carvalho de Melo
2019-05-03 0:25 ` [PATCH 11/11] perf tools: Remove needless asm/unistd.h include fixing build in some places Arnaldo Carvalho de Melo
2019-05-03 5:49 ` [GIT PULL 00/11] perf/urgent fixes Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190503002533.29359-2-acme@kernel.org \
--to=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jolsa@kernel.org \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
--cc=tsu.yubo@gmail.com \
--cc=williams@redhat.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.