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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190422160523.GC11750@kernel.org>
Date:   Mon, 22 Apr 2019 13:05:23 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     "Gustavo A. R. Silva" <gustavo@...eddedor.com>
Cc:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...hat.com>,
        Namhyung Kim <namhyung@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf bpf: Fix lock/unlock imbalance in
 perf_env__find_btf() info

Em Mon, Apr 22, 2019 at 10:10:56AM -0500, Gustavo A. R. Silva escreveu:
> Fix lock/unlock imbalance by moving the call to up_read() just after
> the *out* label.
> 
> Addresses-Coverity-ID: 1444762 ("Missing unlock")
> Fixes: 2db7b1e0bd49 ("perf bpf: Return NULL when RB tree lookup fails in perf_env__find_btf()")
> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.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;
>  }

too late, this was fixed already, also detected by coverity :-)

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ