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

Lucas Stach l.stach at pengutronix.de
Thu Apr 2 08:29:09 PDT 2015


From: Russell King <rmk+kernel at 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 at arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_gpu.c | 2 ++
 1 file changed, 2 insertions(+)

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));
-- 
2.1.4



More information about the dri-devel mailing list