From: Maxime Ripard Date: Tue, 18 Nov 2014 22:59:33 +0000 (+0100) Subject: clockevent: sun4i: Fix race condition in the probe code X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~81^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bab4a8a1888729f17f4923cc5867e4674f66333;p=pandora-kernel.git clockevent: sun4i: Fix race condition in the probe code The interrupts were activated and the handler registered before the clockevent was registered in the probe function. The interrupt handler, however, was making the assumption that the clockevent device was registered. That could cause a null pointer dereference if the timer interrupt was firing during this narrow window. Fix that by moving the clockevent registration before the interrupt is enabled. Reported-by: Roman Byshko Signed-off-by: Maxime Ripard Cc: stable@vger.kernel.org Signed-off-by: Daniel Lezcano --- Reading git-diff-tree failed