From 4c1ece989d32ae25440b1035e35f0f4e491c1c9f Mon Sep 17 00:00:00 2001 From: Antony Clince Alex Date: Tue, 13 Nov 2018 10:31:30 +0530 Subject: [PATCH] gpu: nvgpu: fixed dangling ce2_app pointer The ce2_destroy routine was not clearning the pointer to NULL causing leading to dangling pointer which causes a system crash on system resume. Bug 2437663 Change-Id: If6634be983f9cd42f958d792a73c77c79b4884c3 Signed-off-by: Antony Clince Alex Reviewed-on: https://git-master.nvidia.com/r/1949450 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 30d5589bf..208a28097 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c @@ -418,6 +418,7 @@ void gk20a_ce_destroy(struct gk20a *g) nvgpu_mutex_destroy(&ce_app->app_mutex); free: nvgpu_kfree(g, ce_app); + g->ce_app = NULL; } void gk20a_ce_suspend(struct gk20a *g)