summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMatthias Brugger <matthias.bgg@gmail.com>2015-02-19 11:41:33 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-06 14:57:39 -0800
commit1c09fe950fbf5f1cbb13385f2c91cdcb2f5f4fa0 (patch)
treed389e4eb42b23420d2994c5ec337fabd7ae9e873 /tools
parent5d58e15cc18f95bc06769795aa5237f2b525150e (diff)
clocksource: mtk: Fix race conditions in probe code
commit d4a19eb3b15a4ba98f627182f48d5bc0cffae670 upstream. 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> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions