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]
Date:	Mon, 14 Jan 2013 17:40:20 +0000
From:	Will Deacon <will.deacon@....com>
To:	Cong Ding <dinggnu@...il.com>
Cc:	Russell King - ARM Linux <linux@....linux.org.uk>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Paul Mackerras <paulus@...ba.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] arm: kernel/perf_event_cpu.c: fix error null pointer
 dereference check

On Mon, Jan 14, 2013 at 05:38:26PM +0000, Cong Ding wrote:
> On Mon, Jan 14, 2013 at 05:23:46PM +0000, Russell King - ARM Linux wrote:
> > On Mon, Jan 14, 2013 at 05:18:53PM +0000, Cong Ding wrote:
> > > the pointer cpu_pmu is used without null pointer dereference check, and is
> > > checked after the using of it, so we move the null pointer check to before the
> > > first use.
> > 
> > The NULL pointer check is not necessary.  cpu_pmu_init() is called
> > after cpu_pmu has already been dereferenced by its caller:
> > 
> >         cpu_pmu = pmu;
> >         cpu_pmu->plat_device = pdev;
> >         cpu_pmu_init(cpu_pmu);
> > 
> > So...
> > 
> > > -	/* Ensure the PMU has sane values out of reset. */
> > > -	if (cpu_pmu && cpu_pmu->reset)
> > 
> > Just replace this with:
> > 	if (cpu_pmu->reset)
> Thanks Russell, I will send version 2.

No need, I've taken this into my perf/updates branch.

Thanks,

Will
--
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