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: <20160329125531.GA11035@twins.programming.kicks-ass.net>
Date:	Tue, 29 Mar 2016 14:55:31 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Wang Nan <wangnan0@...wei.com>
Cc:	Alexei Starovoitov <ast@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	linux-kernel@...r.kernel.org,
	Brendan Gregg <brendan.d.gregg@...il.com>,
	He Kuang <hekuang@...wei.com>, Jiri Olsa <jolsa@...nel.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>, pi3orama@....com,
	Zefan Li <lizefan@...wei.com>
Subject: Re: [PATCH 1/4] perf core: Introduce new ioctl options to pause and
 resume ring buffer

On Tue, Mar 29, 2016 at 02:54:23PM +0200, Peter Zijlstra wrote:
> +++ b/kernel/events/core.c
> @@ -4346,7 +4346,7 @@ static long _perf_ioctl(struct perf_even
>  
>  		rcu_read_lock();
>  		rb = rcu_dereference(event->rb);
> -		if (!event->rb) {
> +		if (!event->rb || !event->nr_pages) {
>  			rcu_read_unlock();
>  			return -EINVAL;
>  		}

Clearly that should've been:

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4346,7 +4346,7 @@ static long _perf_ioctl(struct perf_even
 
 		rcu_read_lock();
 		rb = rcu_dereference(event->rb);
-		if (!event->rb || !event->nr_pages) {
+		if (!rb || !rb->nr_pages) {
 			rcu_read_unlock();
 			return -EINVAL;
 		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ