]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/syncobj: Fix xa_alloc allocation flags
authorTvrtko Ursulin <tvrtko.ursulin@igalia.com>
Tue, 24 Mar 2026 11:10:19 +0000 (11:10 +0000)
committerTvrtko Ursulin <tursulin@ursulin.net>
Wed, 25 Mar 2026 08:05:35 +0000 (08:05 +0000)
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 <tvrtko.ursulin@igalia.com>
Fixes: fec2c3c01f1c ("drm/syncobj: Convert syncobj idr to xarray")
Reported-by: Himanshu Girotra <himanshu.girotra@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Himanshu Girotra <himanshu.girotra@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Tvrtko Ursulin <tursulin@ursulin.net>
Link: https://lore.kernel.org/r/20260324111019.22467-1-tvrtko.ursulin@igalia.com
drivers/gpu/drm/drm_syncobj.c

index 250734dee928ed38d865b5bbfe24a9e950e90912..8d9fd1917c6e64e1331b940388f70515a76a4926 100644 (file)
@@ -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);