Commit 06f42971 authored by Tvrtko Ursulin's avatar Tvrtko Ursulin Committed by Tvrtko Ursulin
Browse files

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: default avatarTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Fixes: fec2c3c0 ("drm/syncobj: Convert syncobj idr to xarray")
Reported-by: default avatarHimanshu Girotra <himanshu.girotra@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: default avatarHimanshu Girotra <himanshu.girotra@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarTvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260324111019.22467-1-tvrtko.ursulin@igalia.com
parent e8ab57b5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -602,7 +602,7 @@ int drm_syncobj_get_handle(struct drm_file *file_private,
	drm_syncobj_get(syncobj);

	ret = xa_alloc(&file_private->syncobj_xa, handle, syncobj, xa_limit_32b,
		       GFP_NOWAIT);
		       GFP_KERNEL);
	if (ret)
		drm_syncobj_put(syncobj);

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

	ret = xa_alloc(&file_private->syncobj_xa, handle, syncobj, xa_limit_32b,
		       GFP_NOWAIT);
		       GFP_KERNEL);
	if (ret)
		drm_syncobj_put(syncobj);