Return-Path: Received: from anholt.net ([50.246.234.109]:46760 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933094AbeAYDac (ORCPT ); Wed, 24 Jan 2018 22:30:32 -0500 From: Eric Anholt To: Sasha Levin , "linux-kernel\@vger.kernel.org" , "stable\@vger.kernel.org" Cc: Stefan Schake , Sasha Levin Subject: Re: [PATCH AUTOSEL for 4.14 001/100] drm/vc4: Account for interrupts in flight In-Reply-To: <20180124041414.32065-1-alexander.levin@microsoft.com> References: <20180124041414.32065-1-alexander.levin@microsoft.com> Date: Thu, 25 Jan 2018 14:30:23 +1100 Message-ID: <87lggmpqcw.fsf@anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Sasha Levin writes: > From: Stefan Schake > > [ Upstream commit 253696ccd613fbdaa5aba1de44c461a058e0a114 ] > > Synchronously disable the IRQ to make the following cancel_work_sync > invocation effective. > > An interrupt in flight could enqueue further overflow mem work. As we > free the binner BO immediately following vc4_irq_uninstall this caused > a NULL pointer dereference in the work callback vc4_overflow_mem_work. > > Link: https://github.com/anholt/linux/issues/114 > Signed-off-by: Stefan Schake > Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") > Signed-off-by: Eric Anholt > Reviewed-by: Eric Anholt > Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-= send-email-stschake@gmail.com > Signed-off-by: Sasha Levin We found a bug, and this patch also needs: commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 (tag: drm-misc-fixes-2018-0= 1-08) Author: Stefan Schake Date: Fri Dec 29 17:05:43 2017 +0100 drm/vc4: Move IRQ enable to PM path =20=20=20=20 We were calling enable_irq on bind, where it was already enabled previo= usly by the IRQ helper. Additionally, dev->irq is not set correctly until af= ter postinstall and so was always zero here, triggering a warning in 4.15. Fix both by moving the enable to the power management resume path, wher= e we know there was a previous disable invocation during suspend. =20=20=20=20 Fixes: 253696ccd613 ("drm/vc4: Account for interrupts in flight") Signed-off-by: Stefan Schake Signed-off-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/1514563543-32511-1-= git-send-email-stschake@gmail.com Tested-by: Stefan Wahren Reviewed-by: Eric Anholt --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlppT08ACgkQtdYpNtH8 nug8Qg/6AxCiYlnBknJeh8uCKRWvM9qFUIXBtZoL/PdvhPGxb5yXCLYIfwoFpMlk agOBV2ag9Ni2Fpiyi1rub7nox+pXWfS8Z0pSS2c/O26gnIsDWB9L2NmZ8/2YxnQw z3qZQ8bBtvVmGDoBJjV4odo2Qpwbh8zUvcC4WDiePoE/UgS/YvW/K0cawj585drZ eGXTzGXnLlptQwzOZoZINONlJHIqUi1nCD1vK//snKGDvnWFn4chcKycv38dvxja Q6xYdR9rXTmPp5rQCJIgBf3wVKuwhMI3cfuUO7loexkD5P9giYL6IUY91xbyE87j yy0DPfj+fsOKTGWEINb8SSIeq+oVanQh0+vw7mDdYyfTxVtXtTvLV7fSkMThNXDA PJqDar2QT4yR7Y0q7Wso0jMo71GYRH8TDukBcGzYNQlOMVuoPkw3xZtOp+61w6t9 MDGIhSTkFufOakEUC6Bh1BAGMFrPPpWjMqRBB0JegriU3INgbCiTpDRvZaoaY5kA ImyQqeL8gJfA6/zOO2aEhOYAt6wv5MjGsaWn+XBCS+fq6Plrx4oHX3lPjnXON6ku y/wtp+Ly7OufLelyGC22GE8bckrDEGXleqb0HN3pm7l5geA8TQ3Yv/P4/f+PrIhx mozqPWeHZYXLRnU9zfA09Y2wI68jDdFA+uw7E2FOwcjffMPWpXY= =/pej -----END PGP SIGNATURE----- --=-=-=--