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:	Sun, 6 Apr 2014 15:23:09 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Sachin Kamat <sachin.kamat@...aro.org>
Cc:	Krzysztof Kozlowski <k.kozlowski@...sung.com>,
	Lee Jones <lee.jones@...aro.org>,
	Mark Brown <broonie@...nel.org>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mfd: sec-core: Fix uninitialized 'regmap_rtc' on S2MPA01

On Wed, Mar 19, 2014 at 9:27 AM, Sachin Kamat <sachin.kamat@...aro.org> wrote:
> On 18 March 2014 18:41, Krzysztof Kozlowski <k.kozlowski@...sung.com> wrote:
>> Initialize the 'regmap_rtc' on S2MPA01 to some sane value. Sane at least
>> for S5M87X chipsets, not S2MPS/S2MPA but it won't be used because
>> rtc-s5m driver does not support S2MPA01.
>>
>> This fixes following error:
>> drivers/mfd/sec-core.c:342:45: warning: 'regmap_rtc' may be used uninitialized in this function [-Wuninitialized]
>>
>> Signed-off-by: Krzysztof Kozlowski <k.kozlowski@...sung.com>
>
> From the point of suppressing this warning and considering how it is
> done for S2MPS11,
> Acked-by: Sachin Kamat <sachin.kamat@...aro.org>

This is not just about suppressing a warning. The following may crash when
passed a random pointer:

sec_pmic->regmap_rtc = devm_regmap_init_i2c(sec_pmic->rtc, regmap_rtc);

and if regmap_rtc happens to be NULL, devm_regmap_init_i2c() will
return -EINVAL.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
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