Skip to content

Commit

Permalink
drm/panfrost: Put mapping instead of shmem obj on panfrost_mmu_map_fa…
Browse files Browse the repository at this point in the history
…ult_addr() error

When panfrost_mmu_map_fault_addr() fails, the BO's mapping should be
unreferenced and not the shmem object which backs the mapping.

Cc: stable@vger.kernel.org
Fixes: bdefca2 ("drm/panfrost: Add the panfrost_gem_mapping concept")
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220630200601.1884120-2-dmitry.osipenko@collabora.com
  • Loading branch information
Dmitry Osipenko authored and Steven Price committed Jul 4, 2022
1 parent 8490cad commit fb6e063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/panfrost/panfrost_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,
err_pages:
drm_gem_shmem_put_pages(&bo->base);
err_bo:
drm_gem_object_put(&bo->base.base);
panfrost_gem_mapping_put(bomapping);
return ret;
}

Expand Down

0 comments on commit fb6e063

Please sign in to comment.