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:	Thu, 3 Jul 2014 21:46:55 +0200
From:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>
To:	Wolfram Sang <wsa@...-dreams.de>
Cc:	Jingoo Han <jg1.han@...sung.com>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Leilei Shang <shangll@...vell.com>,
	Peter Korsgaard <peter@...sgaard.com>,
	linux-i2c@...r.kernel.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH v2] i2c: busses: i2c-pxa.c: Fix for possible null pointer dereferenc

2014-07-03 10:41 GMT+02:00 Wolfram Sang <wsa@...-dreams.de>:
> Hi Rickard, hi Jingoo,
>
>> I also trust Wolfram. He is one of the most important and active
>> person for Linux kernel.
>
> Oh, thanks. I'm flattered :)
>
>> Wolfram may mean devm_ioremap_resource(), not devm_ioremap().
>
> Yes, you are right. Sorry for missing this detail when suggesting an
> example to convert to devm_*. devm_ioremap_resource should be favoured
> over devm_ioremap.
>
>> 1. devm_ioremap_resource(): IS_ERR() can be used.
>>
>>       dev->virtbase = devm_ioremap_resource(&adev->dev, res));
>>       if (IS_ERR(dev->virtbase)) {
>
> This is correct and preferred.
>
> BTW I don't care much about splitting up the patch as long as the commit
> message says that the original bug is a motivation to swicth to devm_*.
>
> Thanks Rickard for picking up the task, and thanks Jingoo for reviewing.
>
> Kind regards,
>
>    Wolfram

Hi

Then I changed like:

-       i2c->reg_base = devm_ioremap(&dev->dev, res->start, resource_size(res));
+       i2c->reg_base = devm_ioremap_resource(&adev->dev, res));


I like Wolfram see no point in doing this patch in two steps, as none
of patch 1, which would be the solution to the original problem would
be includid in patch 2.

I will send a V3 of this patch in a moment...


Thanks to everyone who helped out :-)


Kind regards
Rickard Strandqvist
--
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