]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: efm32: Fix a NULL pointer dereference
authorYongbae Park <yongbae2@gmail.com>
Tue, 3 Mar 2015 10:46:49 +0000 (19:46 +0900)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Thu, 5 Mar 2015 14:01:36 +0000 (15:01 +0100)
commitc845a8c13f4e21792d0cf532c2427b4695cc77c0
tree5909a392ea9dcd05abde742b6f61efbdd26f9d36
parent2e43d41fdf5d9bb7497bcfbed64b6a1a7c85de82
clocksource: efm32: Fix a NULL pointer dereference

The initialisation of the efm32 clocksource first sets up the irq and only
after that initialises the data needed for irq handling. In case this
initialisation is delayed the irq handler would dereference a NULL pointer.

I'm not aware of anything that could delay the process in such a way, but it's
better to be safe than sorry, so setup the irq only when the clock event device
is ready.

Cc: stable@vger.kernel.org
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Yongbae Park <yongbae2@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/time-efm32.c