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:	Mon, 04 May 2015 10:14:56 +0200
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Mark Rutland <mark.rutland@....com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>
CC:	Rob Herring <robh+dt@...nel.org>, Pawel Moll <pawel.moll@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Russell King <linux@....linux.org.uk>,
	Jason Cooper <jason@...edaemon.net>,
	Catalin Marinas <catalin.marinas@....com>,
	Marc Carino <marc.ceeeee@...il.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org, srv_heupstream@...iatek.com,
	Sascha Hauer <kernel@...gutronix.de>
Subject: Re: [PATCH 1/7] clocksource: mediatek: Don't run event_handler if
 it is NULL

On 05/01/2015 09:43 AM, Yingjoe Chen wrote:
> Spurious timer interrupt is noticed in mtk timer and cause kernel
> crash. In mtk_timer_interrupt(), only run event_handler if it is
> not NULL.
>
> Signed-off-by: Yingjoe Chen <yingjoe.chen@...iatek.com>
> ---
>   drivers/clocksource/mtk_timer.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/mtk_timer.c b/drivers/clocksource/mtk_timer.c
> index 68ab423..85e0ab5 100644
> --- a/drivers/clocksource/mtk_timer.c
> +++ b/drivers/clocksource/mtk_timer.c
> @@ -143,7 +143,8 @@ static irqreturn_t mtk_timer_interrupt(int irq, void *dev_id)
>
>   	/* Acknowledge timer0 irq */
>   	writel(GPT_IRQ_ACK(GPT_CLK_EVT), evt->gpt_base + GPT_IRQ_ACK_REG);
> -	evt->dev.event_handler(&evt->dev);
> +	if (evt->dev.event_handler)
> +		evt->dev.event_handler(&evt->dev);
>
>   	return IRQ_HANDLED;
>   }
>

This fix does not look good.

Could you try by requesting the irq *after* 
clockevents_config_and_register in the init sequence [1] ?

Thanks
   -- Daniel

[1] 
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1096be084ac59927158ce80ff1d31c33eed0e565

-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
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