summaryrefslogtreecommitdiff
path: root/drivers/clk/qcom/clk-regmap-mux-div.c
diff options
context:
space:
mode:
authorMatthias Brugger <matthias.bgg@gmail.com>2015-02-19 11:41:33 +0100
committerDaniel Lezcano <daniel.lezcano@linaro.org>2015-02-24 08:07:42 +0100
commitb0c329d0ea82d954d4cc3f1fa6fc2869622a6d2e (patch)
tree999afca50b4e202998a45dec8ce5525f73bc775a /drivers/clk/qcom/clk-regmap-mux-div.c
parent3a77cb16af2e31a098cfcb076f25daeb1bff34cb (diff)
clocksource: mtk: Fix race conditions in probe code
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 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'drivers/clk/qcom/clk-regmap-mux-div.c')
0 files changed, 0 insertions, 0 deletions