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: <20120120035910.GB18056@somewhere>
Date:	Fri, 20 Jan 2012 04:59:13 +0100
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Namhyung Kim <namhyung.kim@....com>
Cc:	Ingo Molnar <mingo@...e.hu>, Namhyung Kim <namhyung@...il.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] perf: Don't call release_callchain_buffers if alloc
 fails

On Fri, Jan 20, 2012 at 10:12:45AM +0900, Namhyung Kim wrote:
> When alloc_callchain_buffers() fails, it frees all of
> entries before return. In addition, calling the
> release_callchain_buffers() will cause a NULL pointer
> dereference since callchain_cpu_entries is not set.
> 
> Signed-off-by: Namhyung Kim <namhyung.kim@....com>

Acked-by: Frederic Weisbecker <fweisbec@...il.com>

> ---
>  kernel/events/callchain.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c
> index 057e24b665cf..6581a040f399 100644
> --- a/kernel/events/callchain.c
> +++ b/kernel/events/callchain.c
> @@ -115,8 +115,6 @@ int get_callchain_buffers(void)
>  	}
>  
>  	err = alloc_callchain_buffers();
> -	if (err)
> -		release_callchain_buffers();
>  exit:
>  	mutex_unlock(&callchain_mutex);
>  
> -- 
> 1.7.9.rc1.dirty
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ