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]
Message-id: <11114909.7eTX8MzZjF@amdc3058>
Date:   Wed, 28 Mar 2018 15:56:23 +0200
From:   Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Zhang Rui <rui.zhang@...el.com>,
        Eduardo Valentin <edubezval@...il.com>,
        Kukjin Kim <kgene@...nel.org>,
        Krzysztof Kozlowski <krzk@...nel.org>,
        Marek Szyprowski <m.szyprowski@...sung.com>,
        Maciej Purski <m.purski@...sung.com>, linux-pm@...r.kernel.org,
        linux-samsung-soc@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] thermal: exynos_tmu: avoid uninitialized variables

On Wednesday, March 28, 2018 03:44:44 PM Arnd Bergmann wrote:
> Removing the initialization in the error case introduced
> a compile-time warning:
> 
> drivers/thermal/samsung/exynos_tmu.c: In function 'temp_to_code':
> drivers/thermal/samsung/exynos_tmu.c:304:9: error: 'temp_code' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>   return temp_code;
>          ^~~~~~~~~
> drivers/thermal/samsung/exynos_tmu.c: In function 'exynos_get_temp':
> drivers/thermal/samsung/exynos_tmu.c:931:37: error: 'temp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>    *temp = code_to_temp(data, value) * MCELSIUS;
> 
> Let's assume the runtime warning is sufficient, and make it
> return a well-defined number instead of unintialized data.
> 
> Fixes: 480b5bfc16e1 ("thermal: exynos: remove parsing of samsung, tmu_default_temp_offset property")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks Arnd!

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ