This is a note to let you know that I've just added the patch titled drm/panfrost: Use kvfree() to free bo->sgts to the 5.7-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: drm-panfrost-use-kvfree-to-free-bo-sgts.patch and it can be found in the queue-5.7 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 114427b8927a4def2942b2b886f7e4aeae289ccb Mon Sep 17 00:00:00 2001 From: Denis Efremov <efremov@xxxxxxxxx> Date: Mon, 8 Jun 2020 18:17:28 +0300 Subject: drm/panfrost: Use kvfree() to free bo->sgts From: Denis Efremov <efremov@xxxxxxxxx> commit 114427b8927a4def2942b2b886f7e4aeae289ccb upstream. Use kvfree() to free bo->sgts, because the memory is allocated with kvmalloc_array() in panfrost_mmu_map_fault_addr(). Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Denis Efremov <efremov@xxxxxxxxx> Reviewed-by: Steven Price <steven.price@xxxxxxx> Signed-off-by: Steven Price <steven.price@xxxxxxx> Link: https://patchwork.freedesktop.org/patch/msgid/20200608151728.234026-1-efremov@xxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/gpu/drm/panfrost/panfrost_gem.c | 2 +- drivers/gpu/drm/panfrost/panfrost_mmu.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/drivers/gpu/drm/panfrost/panfrost_gem.c +++ b/drivers/gpu/drm/panfrost/panfrost_gem.c @@ -46,7 +46,7 @@ static void panfrost_gem_free_object(str sg_free_table(&bo->sgts[i]); } } - kfree(bo->sgts); + kvfree(bo->sgts); } drm_gem_shmem_free_object(obj); --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c @@ -486,7 +486,7 @@ static int panfrost_mmu_map_fault_addr(s pages = kvmalloc_array(bo->base.base.size >> PAGE_SHIFT, sizeof(struct page *), GFP_KERNEL | __GFP_ZERO); if (!pages) { - kfree(bo->sgts); + kvfree(bo->sgts); bo->sgts = NULL; mutex_unlock(&bo->base.pages_lock); ret = -ENOMEM; Patches currently in stable-queue which might be from efremov@xxxxxxxxx are queue-5.7/drm-panfrost-use-kvfree-to-free-bo-sgts.patch queue-5.7/drm-radeon-fix-fb_div-check-in-ni_init_smc_spll_table.patch