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] [day] [month] [year] [list]
Date:	Tue, 29 Jan 2013 11:46:41 -0700
From:	Stephen Warren <swarren@...dotorg.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
CC:	Axel Lin <axel.lin@...ics.com>,
	Graeme Gregory <gg@...mlogic.co.uk>,
	Liam Girdwood <lgirdwood@...il.com>,
	linux-kernel@...r.kernel.org,
	Laxman Dewangan <ldewangan@...dia.com>,
	AnilKumar Ch <anilkumar@...com>
Subject: Re: [PATCH 2/2] regulator: tps65910: Fix using wrong dev argument
 for calling of_regulator_match

On 01/28/2013 08:39 PM, Mark Brown wrote:
> On Mon, Jan 28, 2013 at 05:03:29PM -0700, Stephen Warren wrote:
>> On 01/23/2013 07:31 PM, Axel Lin wrote:
>>> The dev parameter is the device requesting the data. In this
>>> case it should be &pdev->dev rather than pdev->dev.parent.
> 
>>> The dev parameter is used to call devm_kzalloc in
>>> of_get_regulator_init_data(), which means this fixes a memory
>>> leak because the memory is allocated every time probe() is
>>> called, thus it should be freed when this driver is unloaded.
> 
>> With this patch as part of next-20130128, I see a crash when
>> booting my system. Reverting this patch solves the problem.
> 
> Hrm, there's nothing obviously wrong with the code here - all we do
> with dev is call devm_kzalloc().  Can you decode where the crash is
> actually occurring, that might give a clue as to what's getting
> upset?  In the backtrace it's in regulator_register() but that's a
> pretty big function.

It looks like there's a bug in of_regulator_match() that this exposes.
I'll send a patch shortly.
--
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