lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1510275907-993-3-git-send-email-stschake@gmail.com>
Date:   Fri, 10 Nov 2017 02:05:07 +0100
From:   Stefan Schake <stschake@...il.com>
To:     dri-devel@...ts.freedesktop.org
Cc:     linux-rpi-kernel@...ts.infradead.org,
        Stefan Schake <stschake@...il.com>,
        Eric Anholt <eric@...olt.net>, David Airlie <airlied@...ux.ie>,
        linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] drm/vc4: Ensure interrupts are disabled

The overflow mem work callback vc4_overflow_mem_work reenables its
associated interrupt upon completion. To ensure all interrupts are disabled
when we return from vc4_irq_uninstall, we need to disable it again if
cancel_work_sync indicated pending work.

Signed-off-by: Stefan Schake <stschake@...il.com>
---
 drivers/gpu/drm/vc4/vc4_irq.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_irq.c b/drivers/gpu/drm/vc4/vc4_irq.c
index 61b2e53..7d780149d 100644
--- a/drivers/gpu/drm/vc4/vc4_irq.c
+++ b/drivers/gpu/drm/vc4/vc4_irq.c
@@ -231,7 +231,14 @@
 	/* Finish any interrupt handler still in flight. */
 	disable_irq(dev->irq);
 
-	cancel_work_sync(&vc4->overflow_mem_work);
+	if (cancel_work_sync(&vc4->overflow_mem_work)) {
+		/*
+		 * Work was still pending. The overflow mem work's
+		 * callback reenables the OUTOMEM interrupt upon
+		 * completion, so ensure it is disabled here.
+		 */
+		V3D_WRITE(V3D_INTDIS, V3D_INT_OUTOMEM);
+	}
 }
 
 /** Reinitializes interrupt registers when a GPU reset is performed. */
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ