Commit 5562f75c authored by Joseph Kogut's avatar Joseph Kogut Committed by Thomas Zimmermann

drm: fix leaked dma handles after removing drm_pci_free

After removing drm_pci_alloc/free, some instances where drm_pci_free()
would have kfreed the dma handle were skipped.

Ensure these handles are freed properly.
Signed-off-by: default avatarJoseph Kogut <joseph.kogut@gmail.com>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210518212859.4148903-1-joseph.kogut@gmail.com
parent e0283ffa
...@@ -685,6 +685,7 @@ static void drm_cleanup_buf_error(struct drm_device *dev, ...@@ -685,6 +685,7 @@ static void drm_cleanup_buf_error(struct drm_device *dev,
dmah->size, dmah->size,
dmah->vaddr, dmah->vaddr,
dmah->busaddr); dmah->busaddr);
kfree(dmah);
} }
} }
kfree(entry->seglist); kfree(entry->seglist);
......
...@@ -71,6 +71,8 @@ static void drm_ati_free_pcigart_table(struct drm_device *dev, ...@@ -71,6 +71,8 @@ static void drm_ati_free_pcigart_table(struct drm_device *dev,
drm_dma_handle_t *dmah = gart_info->table_handle; drm_dma_handle_t *dmah = gart_info->table_handle;
dma_free_coherent(dev->dev, dmah->size, dmah->vaddr, dmah->busaddr); dma_free_coherent(dev->dev, dmah->size, dmah->vaddr, dmah->busaddr);
kfree(dmah);
gart_info->table_handle = NULL; gart_info->table_handle = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment