Skip to content

Commit 82fcee5

Browse files
deepak-rawatthomashvmw
authored andcommitted
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
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: <[email protected]> Signed-off-by: Deepak Rawat <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]>
1 parent 1929e66 commit 82fcee5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_cmdbuf_res.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ void vmw_cmdbuf_res_man_destroy(struct vmw_cmdbuf_res_manager *man)
321321
list_for_each_entry_safe(entry, next, &man->list, head)
322322
vmw_cmdbuf_res_free(man, entry);
323323

324+
drm_ht_remove(&man->resources);
324325
kfree(man);
325326
}
326327

0 commit comments

Comments
 (0)