From: Thomas Gleixner <tglx@linutronix.de>
To: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Cc: linux-kernel@vger.kernel.org,
Daniel Lezcano <daniel.lezcano@linaro.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] clocksource:fix kernel panic due missing event_handler in cs5535
Date: Mon, 30 May 2016 12:35:52 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.11.1605301234310.3639@nanos> (raw)
In-Reply-To: <1464604292-11276-1-git-send-email-ulli.kroll@googlemail.com>
On Mon, 30 May 2016, Hans Ulli Kroll wrote:
> Missing event_handler in mfgpt_tick() caused a kernel panic.
So the real problem is that the interrupt in the device is enabled _BEFORE_
the clock event device is registered.
> diff --git a/drivers/clocksource/cs5535-clockevt.c b/drivers/clocksource/cs5535-clockevt.c
> index 9a7e37c..6f186cf 100644
> --- a/drivers/clocksource/cs5535-clockevt.c
> +++ b/drivers/clocksource/cs5535-clockevt.c
> @@ -129,7 +129,9 @@ static irqreturn_t mfgpt_tick(int irq, void *dev_id)
> cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP,
> MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
>
> - cs5535_clockevent.event_handler(&cs5535_clockevent);
> + if (cs5535_clockevent.event_handler)
> + cs5535_clockevent.event_handler(&cs5535_clockevent);
> +
So what about fixing the above problem instead of having a conditional in the
interrupt handler fast path?
Thanks,
tglx
next parent reply other threads:[~2016-05-30 10:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1464604292-11276-1-git-send-email-ulli.kroll@googlemail.com>
2016-05-30 10:35 ` Thomas Gleixner [this message]
2016-05-31 7:09 ` [PATCH] clocksource:fix kernel panic due missing event_handler in cs5535 Hans Ulli Kroll
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.11.1605301234310.3639@nanos \
--to=tglx@linutronix.de \
--cc=daniel.lezcano@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox