From: daniel.lezcano@linaro.org (Daniel Lezcano)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clocksource: mtk: Fix race conditions in probe code
Date: Tue, 24 Feb 2015 08:16:08 +0100 [thread overview]
Message-ID: <54EC2538.1070005@linaro.org> (raw)
In-Reply-To: <1424342493-31391-1-git-send-email-matthias.bgg@gmail.com>
On 02/19/2015 11:41 AM, Matthias Brugger wrote:
> We have two race conditions in the probe code which could lead to a null
> pointer dereference in the interrupt handler.
>
> The interrupt handler accesses the clockevent device, which may not yet be
> registered.
>
> First race condition happens when the interrupt handler gets registered before
> the interrupts get disabled. The second race condition happens when the
> interrupts get enabled, but the clockevent device is not yet registered.
>
> Fix that by disabling the interrupts before we register the interrupt and enable
> the interrupts after the clockevent device got registered.
>
> Reported-by: Gongbae Park <yongbae2@gmail.com>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: stable at vger.kernel.org
> ---
Applied to my tree as a fix for 3.20.
Thanks !
-- Daniel
--
<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
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Matthias Brugger <matthias.bgg@gmail.com>, tglx@linutronix.de
Cc: yongbae2@gmail.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, stable@vger.kernel.org
Subject: Re: [PATCH] clocksource: mtk: Fix race conditions in probe code
Date: Tue, 24 Feb 2015 08:16:08 +0100 [thread overview]
Message-ID: <54EC2538.1070005@linaro.org> (raw)
In-Reply-To: <1424342493-31391-1-git-send-email-matthias.bgg@gmail.com>
On 02/19/2015 11:41 AM, Matthias Brugger wrote:
> We have two race conditions in the probe code which could lead to a null
> pointer dereference in the interrupt handler.
>
> The interrupt handler accesses the clockevent device, which may not yet be
> registered.
>
> First race condition happens when the interrupt handler gets registered before
> the interrupts get disabled. The second race condition happens when the
> interrupts get enabled, but the clockevent device is not yet registered.
>
> Fix that by disabling the interrupts before we register the interrupt and enable
> the interrupts after the clockevent device got registered.
>
> Reported-by: Gongbae Park <yongbae2@gmail.com>
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: stable@vger.kernel.org
> ---
Applied to my tree as a fix for 3.20.
Thanks !
-- Daniel
--
<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
next prev parent reply other threads:[~2015-02-24 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-19 10:41 [PATCH] clocksource: mtk: Fix race conditions in probe code Matthias Brugger
2015-02-19 10:41 ` Matthias Brugger
2015-02-24 7:16 ` Daniel Lezcano [this message]
2015-02-24 7:16 ` Daniel Lezcano
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=54EC2538.1070005@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.