Skip to content

Commit 816b186

Browse files
matt-auldlucasdemarchi
authored andcommitted
drm/xe/xe_sync: initialise ufence.signalled
We can incorrectly think that the fence has signalled, if we get a non-zero value here from the kmalloc, which is quite plausible. Just use kzalloc to prevent stuff like this. Fixes: 977e5b8 ("drm/xe: Expose user fence from xe_sync_entry") Signed-off-by: Matthew Auld <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Nirmoy Das <[email protected]> Cc: <[email protected]> # v6.10+ Reviewed-by: Nirmoy Das <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 26f69e8) Signed-off-by: Lucas De Marchi <[email protected]>
1 parent 4e8b5a1 commit 816b186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/xe/xe_sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static struct xe_user_fence *user_fence_create(struct xe_device *xe, u64 addr,
5858
if (!access_ok(ptr, sizeof(*ptr)))
5959
return ERR_PTR(-EFAULT);
6060

61-
ufence = kmalloc(sizeof(*ufence), GFP_KERNEL);
61+
ufence = kzalloc(sizeof(*ufence), GFP_KERNEL);
6262
if (!ufence)
6363
return ERR_PTR(-ENOMEM);
6464

0 commit comments

Comments
 (0)