Sasha Levin <Alexander.Levin@xxxxxxxxxxxxx> writes: > From: Stefan Schake <stschake@xxxxxxxxx> > > [ 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 <stschake@xxxxxxxxx> > Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.") > Signed-off-by: Eric Anholt <eric@xxxxxxxxxx> > Reviewed-by: Eric Anholt <eric@xxxxxxxxxx> > Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@xxxxxxxxx > Signed-off-by: Sasha Levin <alexander.levin@xxxxxxxxxxxxx> We found a bug, and this patch also needs: commit ce9caf2f79a5aa170a4b6456a03db639eed9c988 (tag: drm-misc-fixes-2018-01-08) Author: Stefan Schake <stschake@xxxxxxxxx> Date: Fri Dec 29 17:05:43 2017 +0100 drm/vc4: Move IRQ enable to PM path We were calling enable_irq on bind, where it was already enabled previously by the IRQ helper. Additionally, dev->irq is not set correctly until after 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, where we know there was a previous disable invocation during suspend. Fixes: 253696ccd613 ("drm/vc4: Account for interrupts in flight") Signed-off-by: Stefan Schake <stschake@xxxxxxxxx> Signed-off-by: Eric Anholt <eric@xxxxxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/1514563543-32511-1-git-send-email-stschake@xxxxxxxxx Tested-by: Stefan Wahren <stefan.wahren@xxxxxxxx> Reviewed-by: Eric Anholt <eric@xxxxxxxxxx>
Attachment:
signature.asc
Description: PGP signature