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: fec2c3c01f1c ("drm/syncobj: Convert syncobj idr to xarray")
Reported-by: Himanshu Girotra <[email protected]>
Cc: Matthew Brost <[email protected]>
Cc: Thomas Hellström <[email protected]>
---
 drivers/gpu/drm/drm_syncobj.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_syncobj.c b/drivers/gpu/drm/drm_syncobj.c
index 250734dee928..8d9fd1917c6e 100644
--- a/drivers/gpu/drm/drm_syncobj.c
+++ b/drivers/gpu/drm/drm_syncobj.c
@@ -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);
 
-- 
2.52.0

Reply via email to