Re: [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-12 Thread Dan Carpenter
On Mon, Mar 10, 2025 at 12:56:46PM -0400, Rodrigo Vivi wrote: > On Mon, Mar 10, 2025 at 01:48:00PM +0300, Dan Carpenter wrote: > > 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 "b

Re: [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-11 Thread Matthew Brost
On Mon, Mar 10, 2025 at 10:12:15PM -0700, Matthew Brost wrote: > On Mon, Mar 10, 2025 at 10:04:22PM -0700, Matthew Brost wrote: > > On Mon, Mar 10, 2025 at 09:22:50PM +0300, Dan Carpenter wrote: > > > On Mon, Mar 10, 2025 at 12:56:46PM -0400, Rodrigo Vivi wrote: > > > > On Mon, Mar 10, 2025 at 01:4

Re: [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-11 Thread Rodrigo Vivi
On Mon, Mar 10, 2025 at 01:48:00PM +0300, Dan Carpenter wrote: > 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. It is not a couple, but only the one

Re: [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-11 Thread Matthew Brost
On Mon, Mar 10, 2025 at 09:22:50PM +0300, Dan Carpenter wrote: > On Mon, Mar 10, 2025 at 12:56:46PM -0400, Rodrigo Vivi wrote: > > On Mon, Mar 10, 2025 at 01:48:00PM +0300, Dan Carpenter wrote: > > > The error handling assumes that vm_bind_ioctl_check_args() will > > > initialize "bind_ops" but the

Re: [PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-10 Thread Matthew Brost
On Mon, Mar 10, 2025 at 10:04:22PM -0700, Matthew Brost wrote: > On Mon, Mar 10, 2025 at 09:22:50PM +0300, Dan Carpenter wrote: > > On Mon, Mar 10, 2025 at 12:56:46PM -0400, Rodrigo Vivi wrote: > > > On Mon, Mar 10, 2025 at 01:48:00PM +0300, Dan Carpenter wrote: > > > > The error handling assumes t

[PATCH next] drm/xe: Fix uninitialized variable in xe_vm_bind_ioctl()

2025-03-10 Thread Dan Carpenter
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