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]
Message-ID: <AM0PR04MB421199C55AAD04D969B23C9180B50@AM0PR04MB4211.eurprd04.prod.outlook.com>
Date:   Thu, 19 Apr 2018 07:14:42 +0000
From:   "A.s. Dong" <aisheng.dong@....com>
To:     Anson Huang <anson.huang@....com>,
        "daniel.lezcano@...aro.org" <daniel.lezcano@...aro.org>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH] clocksource: imx-tpm: correct -ETIME return condition
 check

> -----Original Message-----
> From: Anson Huang
> Sent: Thursday, April 19, 2018 2:05 PM
> To: daniel.lezcano@...aro.org; tglx@...utronix.de; linux-
> kernel@...r.kernel.org
> Cc: dl-linux-imx <linux-imx@....com>
> Subject: [PATCH] clocksource: imx-tpm: correct -ETIME return condition
> check
> 
> The additional brakets added to tpm_set_next_event's return value
> computation causes (int) forced type conversion NOT taking effect, and the
> incorrect value return will cause various system timer issue, like RCU stall etc..
> 
> This patch removes the additional brakets to make sure
> tpm_set_next_event always returns correct value.
> 
> Signed-off-by: Anson Huang <Anson.Huang@....com>

It's my mistake. Thanks for spotting it out.

Acked-by: Dong Aisheng <Aisheng.dong@....com>

Regards
Dong Aisheng

> ---
> 	resend, since I got failure message of sending mail to linux-
> kernel@...r.kernel.org.
>  drivers/clocksource/timer-imx-tpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/clocksource/timer-imx-tpm.c b/drivers/clocksource/timer-
> imx-tpm.c
> index 05d97a6..6c83184 100644
> --- a/drivers/clocksource/timer-imx-tpm.c
> +++ b/drivers/clocksource/timer-imx-tpm.c
> @@ -114,7 +114,7 @@ static int tpm_set_next_event(unsigned long delta,
>  	 * of writing CNT registers which may cause the min_delta event got
>  	 * missed, so we need add a ETIME check here in case it happened.
>  	 */
> -	return (int)((next - now) <= 0) ? -ETIME : 0;
> +	return (int)(next - now) <= 0 ? -ETIME : 0;
>  }
> 
>  static int tpm_set_state_oneshot(struct clock_event_device *evt)
> --
> 2.7.4

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ