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] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2016 08:07:52 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc:	Eduardo Valentin <edubezval@...il.com>,
	Zhang Rui <rui.zhang@...el.com>, Simon <horms@...ge.net.au>,
	Magnus <magnus.damm@...il.com>,
	Linux-Kernel <linux-kernel@...r.kernel.org>,
	linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH] thermal: core: don't call unsupported trip on thermal_tripped_notify()

Hi Morimoto-san,

On Wed, Jan 20, 2016 at 6:45 AM, Kuninori Morimoto
<kuninori.morimoto.gx@...esas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
>
> It needs to check maximum trip size before using it.
> Otherwise, each driver might be called with unsupported trip.
>
> Reported-by: Magnus Damm <magnus.damm@...il.com>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
> ---
>  drivers/thermal/thermal_core.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
> index 7f7a3ca..9761f49 100644
> --- a/drivers/thermal/thermal_core.c
> +++ b/drivers/thermal/thermal_core.c
> @@ -461,6 +461,9 @@ static void thermal_tripped_notify(struct thermal_zone_device *tz,
>                 kobject_uevent_env(&tz->device.kobj, KOBJ_CHANGE, msg);
>         }
>
> +       if (tz->trips <= trip + 1)
> +               goto unlock;
> +

Thanks, I assume this will fix the "rcar_thermal e61f0000.thermal: rcar
driver trip error" messages.

However, I don't know if it's the right fix, cfr. my unanswered question at
https://lkml.org/lkml/2016/1/5/107

>         ret = tz->ops->get_trip_temp(tz, trip + 1, &upper_trip_temp);
>         if (ret)
>                 goto unlock;
> --
> 1.9.1

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ