From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758945AbcHYIOs (ORCPT ); Thu, 25 Aug 2016 04:14:48 -0400 Received: from down.free-electrons.com ([37.187.137.238]:32816 "EHLO mail.free-electrons.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752738AbcHYIOq (ORCPT ); Thu, 25 Aug 2016 04:14:46 -0400 Date: Thu, 25 Aug 2016 10:04:09 +0200 From: Maxime Ripard To: Chen-Yu Tsai Cc: Daniel Lezcano , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3] clocksource: sun4i: Clear interrupts after stopping timer in probe function Message-ID: <20160825080409.GE7776@lukather> References: <20160825062659.17433-1-wens@csie.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gMR3gsNFwZpnI/Ts" Content-Disposition: inline In-Reply-To: <20160825062659.17433-1-wens@csie.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gMR3gsNFwZpnI/Ts Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Aug 25, 2016 at 02:26:59PM +0800, Chen-Yu Tsai wrote: > The bootloader (U-boot) sometimes uses this timer for various delays. > It uses it as a ongoing counter, and does comparisons on the current > counter value. The timer counter is never stopped. >=20 > In some cases when the user interacts with the bootloader, or lets > it idle for some time before loading Linux, the timer may expire, > and an interrupt will be pending. This results in an unexpected > interrupt when the timer interrupt is enabled by the kernel, at > which point the event_handler isn't set yet. This results in a NULL > pointer dereference exception, panic, and no way to reboot. >=20 > Clear any pending interrupts after we stop the timer in the probe > function to avoid this. >=20 > Cc: stable@vger.kernel.org > Signed-off-by: Chen-Yu Tsai Acked-by: Maxime Ripard Thanks! Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --gMR3gsNFwZpnI/Ts Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXvqZ5AAoJEBx+YmzsjxAga5gP/0lb88iLZGY/dX77RkvrIGFb QL9Nz5fuT/rS+kSAUODsdTtiKgp/5Zr7RZMbsrphzoNwcRcWEepNTvBIPfcvwpld SdqQN2/H1s2HpRyGIIMjQj45lVgOudBP49zFSnCf4uGrRMV6vpxg1sm8ZNZupOPB /VYFSZXEDR7lGEgfwAZ3OrlZLf9x/0dgM0E7AFTxpC1zzlg3ZfwJ5se8tNrEh8MP ti5Y6yGW+PYJ+t9CrUsZGmOqxIJz2kJLYxp0y+MfDP1emxDc7mgS1ZdvrGLu/0y3 X4+89wNUTbGyZAuUAygOiD166WWgWp2LjIkKoY8KHMANI6Y9TqNQB4Tt1EBUwdoH DAoXsuh8EkLBr/bd6pscemkUinJjcsgF7T6mac+OvrF5jjAImPUq3pU7Um0aBOQo Oh+XN6FX4HA1XMz1Ju74bwFRhfbpvW5200Nq+nc0RU+x9OK+c/QyCnKFmKDGiQLt efMTCywHMTax19SJJgokRV8ta1ilT+3fWp/MI2LLi3fmrIEGFvEKRnCB3jSFLcxE bTkaK7Gi5dRYHB+kjnNch+Apo7lerup27M/FLrH0G2C4O5aLnE6bS0U/l7xCq8iC HnlqWHSezXIV9YIqWQnXi/dnGgp13bydwISA29qzzB0zx7AcmsoRXsT3PADGmKWX t2a0RWoab5RVjbSln+FC =1SQ5 -----END PGP SIGNATURE----- --gMR3gsNFwZpnI/Ts--