lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190422142926.GA11750@kernel.org>
Date:   Mon, 22 Apr 2019 11:29:26 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Bo YU <tsu.yubo@...il.com>, peterz@...radead.org,
        alexander.shishkin@...ux.intel.com, namhyung@...nel.org,
        ast@...nel.org, daniel@...earbox.net, kafai@...com,
        songliubraving@...com, yhs@...com, adrian.hunter@...el.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Subject: Re: [PATCH] perf bpf: return value with unlocking in
 perf_env__find_btf()

Em Mon, Apr 22, 2019 at 11:36:29AM +0200, Jiri Olsa escreveu:
> On Mon, Apr 22, 2019 at 04:01:38AM -0400, Bo YU wrote:
> > 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 :-\
 
> Acked-by: Jiri Olsa <jolsa@...nel.org>

Applied.

Thanks,

- Arnaldo
 
> thanks,
> jirka
> 
> > Signed-off-by: Bo YU <tsu.yubo@...il.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.11.0
> > 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ