Skip to content

Commit 06f4297

Browse files
Tvrtko Ursulintursulin
authored andcommitted
drm/syncobj: Fix xa_alloc allocation flags
The xarray conversion blindly and wrongly replaced idr_alloc with xa_alloc and kept the GFP_NOWAIT. It should have been GFP_KERNEL to account for idr_preload it removed. Fix it. Signed-off-by: Tvrtko Ursulin <[email protected]> Fixes: fec2c3c ("drm/syncobj: Convert syncobj idr to xarray") Reported-by: Himanshu Girotra <[email protected]> Cc: Matthew Brost <[email protected]> Cc: Thomas Hellström <[email protected]> Reviewed-by: Thomas Hellström <[email protected]> Reviewed-by: Himanshu Girotra <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: Tvrtko Ursulin <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e8ab57b commit 06f4297

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpu/drm/drm_syncobj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ int drm_syncobj_get_handle(struct drm_file *file_private,
602602
drm_syncobj_get(syncobj);
603603

604604
ret = xa_alloc(&file_private->syncobj_xa, handle, syncobj, xa_limit_32b,
605-
GFP_NOWAIT);
605+
GFP_KERNEL);
606606
if (ret)
607607
drm_syncobj_put(syncobj);
608608

@@ -716,7 +716,7 @@ static int drm_syncobj_fd_to_handle(struct drm_file *file_private,
716716
drm_syncobj_get(syncobj);
717717

718718
ret = xa_alloc(&file_private->syncobj_xa, handle, syncobj, xa_limit_32b,
719-
GFP_NOWAIT);
719+
GFP_KERNEL);
720720
if (ret)
721721
drm_syncobj_put(syncobj);
722722

0 commit comments

Comments
 (0)