perf bpf: return value with unlocking in perf_env__find_btf()
Subsystems (4)
PATCH 1/1 perf bpf: return value with unlocking in perf_env__find_btf()
In perf_env__find_btf(), returning without unlocking "env->bpf_progs.lock". There may be cause lockdep issue.
DEtected by CoversityScan, CID# 1444762:(program hangs(LOCK))
--- tools/perf/util/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/env.c +1 -1
@@ -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; }
Signature · 1 line
2.11.0
Quoted 6 lines · Bo YU
In
perf_env__find_btf(), returning without unlocking "env->bpf_progs.lock". There may be cause lockdep issue.DEtected by CoversityScan, CID# 1444762:(program hangs(LOCK))
Fixes 2db7b1e0bd49d: (perf bpf: Return NULL when RB tree lookup fails in perf_env__find_btf())
ugh, sry about that
thanks,
jirka
Quoted 22 lines
Signed-off-by Bo YU <[email protected]>--- tools/perf/util/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/env.c +1
-1@@ -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; }Signature · 1 line
2.11.0
Arnaldo Carvalho de Melo
AppliedEm Mon, Apr 22, 2019 at 11:36:29AM +0200, Jiri Olsa escreveu:
Quoted 9 lines · Bo YU
Quoted 6 lines
In
perf_env__find_btf(), returning without unlocking "env->bpf_progs.lock". There may be cause lockdep issue.DEtected by CoversityScan, CID# 1444762:(program hangs(LOCK))
Fixes 2db7b1e0bd49d: (perf bpf: Return NULL when RB tree lookup fails in perf_env__find_btf())ugh, sry about that
Brown paper bag on the part of everybody involved indeed :-\
Quoted 1 line
Acked-by Jiri Olsa <[email protected]>
Applied.
Thanks,
- Arnaldo
Quoted 25 lines
thanks,
jirkaQuoted 22 lines
Signed-off-by Bo YU <[email protected]>--- tools/perf/util/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/util/env.c +1
-1@@ -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; }Signature · 1 line
2.11.0
Signature · 1 line
- Arnaldo
tip-bot for Bo YU
merge bot[tip:perf/urgent] perf bpf: Return value with unlocking in perf_env__find_btf()
In reply to Bo YUperf bpf: Return value with unlocking in perf_env__find_btf()
Commit-ID: 2e712675ffd1331bb527dfc851b0e98cd684c2f1 Gitweb: https://git.kernel.org/tip/2e712675ffd1331bb527dfc851b0e98cd684c2f1 Author: Bo YU <[email protected]> AuthorDate: Mon, 22 Apr 2019 04:01:38 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 2 May 2019 16:00:19 -0400
perf bpf: Return value with unlocking in perf_env__find_btf()
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))
--- tools/perf/util/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/env.c +1 -1
@@ -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; }