linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH AUTOSEL for 4.9 01/55] drm/vc4: Account for interrupts in flight
@ 2018-01-24  4:15 Sasha Levin
  2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 02/55] cpupowerutils: bench - Fix cpu online check Sasha Levin
                   ` (53 more replies)
  0 siblings, 54 replies; 58+ messages in thread
From: Sasha Levin @ 2018-01-24  4:15 UTC (permalink / raw)
  To: linux-kernel, stable; +Cc: Stefan Schake, Eric Anholt, Sasha Levin

From: Stefan Schake <stschake@gmail.com>

[ 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@gmail.com>
Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
---
 drivers/gpu/drm/vc4/vc4_irq.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index 094bc6a475c1..d45a7c0a7915 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -208,6 +208,9 @@ vc4_irq_postinstall(struct drm_device *dev)
 {
 	struct vc4_dev *vc4 = to_vc4_dev(dev);
 
+	/* Undo the effects of a previous vc4_irq_uninstall. */
+	enable_irq(dev->irq);
+
 	/* Enable both the render done and out of memory interrupts. */
 	V3D_WRITE(V3D_INTENA, V3D_DRIVER_IRQS);
 
@@ -225,6 +228,9 @@ vc4_irq_uninstall(struct drm_device *dev)
 	/* Clear any pending interrupts we might have left. */
 	V3D_WRITE(V3D_INTCTL, V3D_DRIVER_IRQS);
 
+	/* Finish any interrupt handler still in flight. */
+	disable_irq(dev->irq);
+
 	cancel_work_sync(&vc4->overflow_mem_work);
 }
 
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 58+ messages in thread

end of thread, other threads:[~2018-01-24 17:27 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24  4:15 [PATCH AUTOSEL for 4.9 01/55] drm/vc4: Account for interrupts in flight Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 02/55] cpupowerutils: bench - Fix cpu online check Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 04/55] KVM: x86: emulator: Return to user-mode on L1 CPL=0 emulation failure Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 03/55] cpupower : Fix cpupower working when cpu0 is offline Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 05/55] KVM: x86: Don't re-execute instruction when not passing CR2 value Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 06/55] KVM: X86: Fix operand/address-size during instruction decoding Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 07/55] KVM: x86: ioapic: Fix level-triggered EOI and IOAPIC reconfigure race Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 09/55] KVM: x86: ioapic: Preserve read-only values in the redirection table Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 08/55] KVM: x86: ioapic: Clear Remote IRR when entry is switched to edge-triggered Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 10/55] ACPI / bus: Leave modalias empty for devices which are not present Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 11/55] cpufreq: Add Loongson machine dependencies Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 12/55] bcache: check return value of register_shrinker Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 13/55] drm/amdgpu: Fix SDMA load/unload sequence on HWS disabled mode Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 14/55] drm/amdkfd: Fix SDMA ring buffer size calculation Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 16/55] openvswitch: fix the incorrect flow action alloc size Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 15/55] drm/amdkfd: Fix SDMA oversubsription handling Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 18/55] btrfs: fix deadlock when writing out space cache Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 17/55] mac80211: fix the update of path metric for RANN frame Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 19/55] reiserfs: remove unneeded i_version bump Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 20/55] KVM: X86: Fix softlockup when get the current kvmclock Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 21/55] KVM: VMX: Fix rflags cache during vCPU reset Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 22/55] xfs: always free inline data before resetting inode fork during ifree Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 23/55] xen-netfront: remove warning when unloading module Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 24/55] auxdisplay: img-ascii-lcd: Only build on archs that have IOMEM Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 25/55] nfsd: CLOSE SHOULD return the invalid special stateid for NFSv4.x (x>0) Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 26/55] nfsd: Ensure we don't recognise lock stateids after freeing them Sasha Levin
2018-01-24 15:47   ` J. Bruce Fields
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 27/55] nfsd: Ensure we check stateid validity in the seqid operation checks Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 28/55] grace: replace BUG_ON by WARN_ONCE in exit_net hook Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 29/55] nfsd: check for use of the closed special stateid Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 30/55] lockd: fix "list_add double add" caused by legacy signal interface Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 31/55] hwmon: (pmbus) Use 64bit math for DIRECT format values Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 32/55] bnxt_en: Fix an error handling path in 'bnxt_get_module_eeprom()' Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 33/55] xfs: fortify xfs_alloc_buftarg error handling Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 34/55] drm/amdgpu: don't try to move pinned BOs Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 35/55] net: ethernet: xilinx: Mark XILINX_LL_TEMAC broken on 64-bit Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 36/55] quota: Check for register_shrinker() failure Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 37/55] SUNRPC: Allow connect to return EHOSTUNREACH Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 39/55] kmemleak: add scheduling point to kmemleak_scan() Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 38/55] fs/mbcache.c: make count_objects() more robust Sasha Levin
2018-01-24  4:29   ` Eric Biggers
2018-01-24 17:27     ` Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 40/55] drm/bridge: tc358767: do no fail on hi-res displays Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 41/55] drm/bridge: tc358767: filter out too high modes Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 42/55] drm/bridge: tc358767: fix DP0_MISC register set Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 43/55] drm/bridge: tc358767: fix timing calculations Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 44/55] drm/bridge: tc358767: fix AUXDATAn registers access Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 46/55] drm/omap: Fix error handling path in 'omap_dmm_probe()' Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 45/55] drm/bridge: tc358767: fix 1-lane behavior Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 48/55] xfs: Properly retry failed dquot items in case of error during buffer writeback Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 47/55] xfs: ubsan fixes Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 50/55] scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 49/55] scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 51/55] iwlwifi: mvm: fix the TX queue hang timeout for MONITOR vif type Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 52/55] ARM: dts: NSP: Fix PPI interrupt types Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 53/55] media: usbtv: add a new usbid Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 54/55] usb: gadget: don't dereference g until after it has been null checked Sasha Levin
2018-01-24  4:15 ` [PATCH AUTOSEL for 4.9 55/55] staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).