Skip to content

Commit

Permalink
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
Browse files Browse the repository at this point in the history
The hash table created during vmw_cmdbuf_res_man_create was
never freed. This causes memory leak in context creation.
Added the corresponding drm_ht_remove in vmw_cmdbuf_res_man_destroy.

Tested for memory leak by running piglit overnight and kernel
memory is not inflated which earlier was.

Cc: <stable@vger.kernel.org>
Signed-off-by: Deepak Rawat <drawat@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
  • Loading branch information
Deepak Rawat authored and Thomas Hellstrom committed Jun 26, 2017
1 parent 1929e66 commit 82fcee5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ void vmw_cmdbuf_res_man_destroy(struct vmw_cmdbuf_res_manager *man)
list_for_each_entry_safe(entry, next, &man->list, head)
vmw_cmdbuf_res_free(man, entry);

drm_ht_remove(&man->resources);
kfree(man);
}

Expand Down

0 comments on commit 82fcee5

Please sign in to comment.