diff mbox

[RFC,007/111] staging: etnaviv: fix oops in timer subsystem caused by hangcheck timer

Message ID 1427988653-754-8-git-send-email-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach April 2, 2015, 3:29 p.m. UTC
From: Russell King <rmk+kernel@arm.linux.org.uk>

We must delete the hangcheck timer before freeing its memory, otherwise
we oops the kernel in the timer code when the memory is overwritten.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_gpu.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index 8e44493038cb..40ee6ac2ccd7 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -863,6 +863,8 @@  static void etnaviv_gpu_unbind(struct device *dev, struct device *master,
 {
 	struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
 
+	del_timer(&gpu->hangcheck_timer);
+
 	DBG("%s", gpu->name);
 
 	WARN_ON(!list_empty(&gpu->active_list));