diff options
author | Donald Robson <donald.robson@imgtec.com> | 2023-12-13 17:44:31 +0300 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2023-12-15 16:04:21 +0300 |
commit | 8a53e29fe05c56f643eaab285f224c09b9c3dd4c (patch) | |
tree | 1c544f78b00f29a08567e6c0f6eae7f6621f2d8d /include/drm | |
parent | f175498378bdae2ebcf61170a2a866cb96e8a69a (diff) | |
download | linux-8a53e29fe05c56f643eaab285f224c09b9c3dd4c.tar.xz |
drm/imagination: Fix error path in pvr_vm_create_context
It is possible to double free the vm_ctx->mmu_ctx object in this
function.
630 err_page_table_destroy:
--> 631 pvr_mmu_context_destroy(vm_ctx->mmu_ctx);
The pvr_vm_context_put() function does:
kref_put(&vm_ctx->ref_count, pvr_vm_context_release);
Here the pvr_vm_context_release() will call:
pvr_mmu_context_destroy(vm_ctx->mmu_ctx);
Refactor to an unwind style.
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231213144431.94956-2-donald.robson@imgtec.com
Diffstat (limited to 'include/drm')
0 files changed, 0 insertions, 0 deletions