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
| ||
|
Message-ID: <3ff0dc4e-0708-9384-5ac2-01f23f35fa64@samsung.com> Date: Mon, 3 Oct 2022 15:50:03 +0200 From: Marek Szyprowski <m.szyprowski@...sung.com> To: Daniel Lezcano <daniel.lezcano@...aro.org>, rafael@...nel.org Cc: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>, Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>, Amit Kucheria <amitk@...nel.org>, Zhang Rui <rui.zhang@...el.com>, Alim Akhtar <alim.akhtar@...sung.com>, "open list:SAMSUNG THERMAL DRIVER" <linux-pm@...r.kernel.org>, "open list:SAMSUNG THERMAL DRIVER" <linux-samsung-soc@...r.kernel.org>, "moderated list:ARM/SAMSUNG S3C, S5P AND EXYNOS ARM ARCHITECTURES" <linux-arm-kernel@...ts.infradead.org>, open list <linux-kernel@...r.kernel.org> Subject: Re: [PATCH] thermal/drivers/exynos: Fix NULL pointer dereference when getting the critical temp On 03.10.2022 15:29, Daniel Lezcano wrote: > The driver is assuming the get_critical temperature exists as it is > inherited by the thermal of ops. But this one has been removed in > favor of the generic one. > > Use the generic thermal_zone_get_crit_temp() function instead > > Fixes: 13bea86623b ("thermal/of: Remove of_thermal_get_crit_temp(") > Reported-by: Marek Szyprowski <m.szyprowski@...sung.com> > Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org> Tested-by: Marek Szyprowski <m.szyprowski@...sung.com> > --- > drivers/thermal/samsung/exynos_tmu.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c > index 5a1ffe2f3134..37465af59262 100644 > --- a/drivers/thermal/samsung/exynos_tmu.c > +++ b/drivers/thermal/samsung/exynos_tmu.c > @@ -264,9 +264,8 @@ static int exynos_tmu_initialize(struct platform_device *pdev) > unsigned int status; > int ret = 0, temp; > > - if (data->soc != SOC_ARCH_EXYNOS5433) /* FIXME */ > - ret = tzd->ops->get_crit_temp(tzd, &temp); > - if (ret) { > + ret = thermal_zone_get_crit_temp(tzd, &temp); > + if (ret && data->soc != SOC_ARCH_EXYNOS5433) { /* FIXME */ > dev_err(&pdev->dev, > "No CRITICAL trip point defined in device tree!\n"); > goto out; Best regards -- Marek Szyprowski, PhD Samsung R&D Institute Poland
Powered by blists - more mailing lists