Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()
@ 2025-03-10 10:48 Dan Carpenter
  2025-03-10 10:56 ` ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Dan Carpenter @ 2025-03-10 10:48 UTC (permalink / raw)
  To: Matthew Brost
  Cc: Lucas De Marchi, Thomas Hellström, Rodrigo Vivi,
	David Airlie, Simona Vetter, Himal Prasad Ghimiray, intel-xe,
	dri-devel, linux-kernel, kernel-janitors

The error handling assumes that vm_bind_ioctl_check_args() will
initialize "bind_ops" but there are a couple early returns where that's
not true.  Initialize "bind_ops" to NULL from the start.

Fixes: b43e864af0d4 ("drm/xe/uapi: Add DRM_XE_VM_BIND_FLAG_CPU_ADDR_MIRROR")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/xe/xe_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 22a26aff3a6e..d85759b958d0 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -3287,7 +3287,7 @@ int xe_vm_bind_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 	struct xe_exec_queue *q = NULL;
 	u32 num_syncs, num_ufence = 0;
 	struct xe_sync_entry *syncs = NULL;
-	struct drm_xe_vm_bind_op *bind_ops;
+	struct drm_xe_vm_bind_op *bind_ops = NULL;
 	struct xe_vma_ops vops;
 	struct dma_fence *fence;
 	int err;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-03-12  6:16 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-10 10:48 [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl() Dan Carpenter
2025-03-10 10:56 ` ✓ CI.Patch_applied: success for " Patchwork
2025-03-10 10:56 ` ✓ CI.checkpatch: " Patchwork
2025-03-10 10:57 ` ✓ CI.KUnit: " Patchwork
2025-03-10 11:14 ` ✓ CI.Build: " Patchwork
2025-03-10 11:16 ` ✓ CI.Hooks: " Patchwork
2025-03-10 11:18 ` ✓ CI.checksparse: " Patchwork
2025-03-10 16:56 ` [PATCH next] " Rodrigo Vivi
2025-03-10 18:22   ` Dan Carpenter
2025-03-11  5:04     ` Matthew Brost
2025-03-11  5:12       ` Matthew Brost
2025-03-12  6:17         ` Matthew Brost
2025-03-11  6:08 ` ✓ Xe.CI.BAT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox