From b64ee64fa79b527b5493c08755ac4d23e1fcf70b Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Fri, 1 Mar 2019 15:41:56 -0800 Subject: [PATCH] gpu: nvgpu: do not free individual runlists gk20a_fifo_delete_runlist was invoking nvgpu_kfree for each runlist, but active runlists are now stored in the g->active_runlist_info array. Remove nvgpu_kfree for individual runlists. Also clear active_runlist_info and num_runlists fields in gk20a_fifo_delete_runlist. Bug 2470115 Bug 2522374 Change-Id: Ie678c16af31ed8345ca0f015c17d61a3965b924d Signed-off-by: Thomas Fleury Reviewed-on: https://git-master.nvidia.com/r/2030970 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra Reviewed-by: Deepak Nibade GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/fifo/runlist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/common/fifo/runlist.c b/drivers/gpu/nvgpu/common/fifo/runlist.c index 3cebc6a66..13db6c160 100644 --- a/drivers/gpu/nvgpu/common/fifo/runlist.c +++ b/drivers/gpu/nvgpu/common/fifo/runlist.c @@ -626,10 +626,11 @@ void gk20a_fifo_delete_runlist(struct fifo_gk20a *f) nvgpu_mutex_destroy(&runlist->runlist_lock); f->runlist_info[runlist->runlist_id] = NULL; - nvgpu_kfree(g, runlist); } nvgpu_kfree(g, f->active_runlist_info); + f->active_runlist_info = NULL; + f->num_runlists = 0; nvgpu_kfree(g, f->runlist_info); f->runlist_info = NULL; f->max_runlists = 0;