Skip to content
Snippets Groups Projects
Commit b3506b8b authored by Donald Robson's avatar Donald Robson Committed by Frank Binns
Browse files

drm/imagination: Fixed null deref in pvr_queue_cleanup_fw_context()


When sending a bad stream ptr through the CREATE_CONTEXT ioctl it was
possible to create queues without a fw ctx being alloced, but the
error path tried to clean it up all the same.

Signed-off-by: default avatarDonald Robson <donald.robson@imgtec.com>
parent b294fa88
No related branches found
No related tags found
No related merge requests found
...@@ -1152,6 +1152,9 @@ static void init_fw_context(struct pvr_queue *queue, void *fw_ctx_map) ...@@ -1152,6 +1152,9 @@ static void init_fw_context(struct pvr_queue *queue, void *fw_ctx_map)
*/ */
static int pvr_queue_cleanup_fw_context(struct pvr_queue *queue) static int pvr_queue_cleanup_fw_context(struct pvr_queue *queue)
{ {
if (!queue->ctx->fw_obj)
return 0;
return pvr_fw_structure_cleanup(queue->ctx->pvr_dev, return pvr_fw_structure_cleanup(queue->ctx->pvr_dev,
ROGUE_FWIF_CLEANUP_FWCOMMONCONTEXT, ROGUE_FWIF_CLEANUP_FWCOMMONCONTEXT,
queue->ctx->fw_obj, queue->ctx_offset); queue->ctx->fw_obj, queue->ctx_offset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment