mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-01-12 09:32:12 +00:00
Short summary of fixes pull:
nouveau: - Return errno code from TTM move helper vmwgfx: - Fix null-ptr access in cursor code - Fix UAF in validation - Use correct iterator in validation -----BEGIN PGP SIGNATURE----- iQFPBAABCgA5FiEEchf7rIzpz2NEoWjlaA3BHVMLeiMFAmjno28bFIAAAAAABAAO bWFudTIsMi41KzEuMTEsMiwyAAoJEGgNwR1TC3ojnsAH/REpA3ycPkUNP2clTfsd qcaTFuYRSLLpPeqxsTNsQU/0+K8oG+sShTjo5p9zMZ2ZmNosq6SnQgBwLiOmqyaS FnXa/ToMIAw3gCjZzTHw5s3icVGs+BzdXJSljr34F7blRsAFvy6g/ina0cVW1wqy sucPFzhXa1kJ9xT1VVP7GlqRdhpCszoL3wbhXtgxpA1ThaRBKyfwcVEo8sKETfnz PiVqaEmwfznH3dwZ/hxM2FxKi35TFYqSlJN2rEjehZF3OBKhyc6RU4fZN1cyal9o XNsH6Zk+5nFJTofK2MF+eLOaP0kdqixHibAFTAQCmFk10QzSCcO9CjiSyLIZzIha AsQ= =LMAa -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2025-10-09' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: nouveau: - Return errno code from TTM move helper vmwgfx: - Fix null-ptr access in cursor code - Fix UAF in validation - Use correct iterator in validation Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://lore.kernel.org/r/20251009120004.GA17570@linux.fritz.box
This commit is contained in:
commit
5ca5f00a16
@ -929,7 +929,7 @@ done:
|
||||
nvif_vmm_put(vmm, &old_mem->vma[1]);
|
||||
nvif_vmm_put(vmm, &old_mem->vma[0]);
|
||||
}
|
||||
return 0;
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
@ -1497,6 +1497,7 @@ static int vmw_cmd_dma(struct vmw_private *dev_priv,
|
||||
SVGA3dCmdHeader *header)
|
||||
{
|
||||
struct vmw_bo *vmw_bo = NULL;
|
||||
struct vmw_resource *res;
|
||||
struct vmw_surface *srf = NULL;
|
||||
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdSurfaceDMA);
|
||||
int ret;
|
||||
@ -1532,18 +1533,24 @@ static int vmw_cmd_dma(struct vmw_private *dev_priv,
|
||||
|
||||
dirty = (cmd->body.transfer == SVGA3D_WRITE_HOST_VRAM) ?
|
||||
VMW_RES_DIRTY_SET : 0;
|
||||
ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface,
|
||||
dirty, user_surface_converter,
|
||||
&cmd->body.host.sid, NULL);
|
||||
ret = vmw_cmd_res_check(dev_priv, sw_context, vmw_res_surface, dirty,
|
||||
user_surface_converter, &cmd->body.host.sid,
|
||||
NULL);
|
||||
if (unlikely(ret != 0)) {
|
||||
if (unlikely(ret != -ERESTARTSYS))
|
||||
VMW_DEBUG_USER("could not find surface for DMA.\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
srf = vmw_res_to_srf(sw_context->res_cache[vmw_res_surface].res);
|
||||
res = sw_context->res_cache[vmw_res_surface].res;
|
||||
if (!res) {
|
||||
VMW_DEBUG_USER("Invalid DMA surface.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
vmw_kms_cursor_snoop(srf, sw_context->fp->tfile, &vmw_bo->tbo, header);
|
||||
srf = vmw_res_to_srf(res);
|
||||
vmw_kms_cursor_snoop(srf, sw_context->fp->tfile, &vmw_bo->tbo,
|
||||
header);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -308,8 +308,10 @@ int vmw_validation_add_resource(struct vmw_validation_context *ctx,
|
||||
hash_add_rcu(ctx->sw_context->res_ht, &node->hash.head, node->hash.key);
|
||||
}
|
||||
node->res = vmw_resource_reference_unless_doomed(res);
|
||||
if (!node->res)
|
||||
if (!node->res) {
|
||||
hash_del_rcu(&node->hash.head);
|
||||
return -ESRCH;
|
||||
}
|
||||
|
||||
node->first_usage = 1;
|
||||
if (!res->dev_priv->has_mob) {
|
||||
@ -636,7 +638,7 @@ void vmw_validation_drop_ht(struct vmw_validation_context *ctx)
|
||||
hash_del_rcu(&val->hash.head);
|
||||
|
||||
list_for_each_entry(val, &ctx->resource_ctx_list, head)
|
||||
hash_del_rcu(&entry->hash.head);
|
||||
hash_del_rcu(&val->hash.head);
|
||||
|
||||
ctx->sw_context = NULL;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user