Skip to content

Commit 764a2ab

Browse files
committed
drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
Make sure all bo->base.pages entries are either NULL or pointing to a valid page before calling drm_gem_shmem_put_pages(). Reported-by: Tomeu Vizoso <[email protected]> Cc: <[email protected]> Fixes: 187d292 ("drm/panfrost: Add support for GPU heap allocations") Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Steven Price <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7f67aa0 commit 764a2ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/gpu/drm/panfrost/panfrost_mmu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -504,6 +504,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,
504504
if (IS_ERR(pages[i])) {
505505
mutex_unlock(&bo->base.pages_lock);
506506
ret = PTR_ERR(pages[i]);
507+
pages[i] = NULL;
507508
goto err_pages;
508509
}
509510
}

0 commit comments

Comments
 (0)