diff --git a/drivers/gpu/drm/lima/lima_gp.c b/drivers/gpu/drm/lima/lima_gp.c
index 706652cb1741a45d5dabf4e6c35a88617b5a4fca..6c902648e5cd472fccff698db25328c653eb2ace 100644
--- a/drivers/gpu/drm/lima/lima_gp.c
+++ b/drivers/gpu/drm/lima/lima_gp.c
@@ -245,9 +245,10 @@ int lima_gp_pipe_init(struct lima_device *dev)
 	struct lima_sched_pipe *pipe = dev->pipe + lima_pipe_gp;
 
 	if (!lima_gp_task_slab) {
-		lima_gp_task_slab = kmem_cache_create(
+		lima_gp_task_slab = kmem_cache_create_usercopy(
 			"lima_gp_task", sizeof(struct lima_sched_task) + frame_size,
-			0, SLAB_HWCACHE_ALIGN, NULL);
+			0, SLAB_HWCACHE_ALIGN, sizeof(struct lima_sched_task),
+			frame_size, NULL);
 		if (!lima_gp_task_slab)
 			return -ENOMEM;
 	}
diff --git a/drivers/gpu/drm/lima/lima_pp.c b/drivers/gpu/drm/lima/lima_pp.c
index 3355895ceebac4de95e5a7941676077c8b88ad7e..502190d1bf3f71d57180c96c8ef1430e18bf53cb 100644
--- a/drivers/gpu/drm/lima/lima_pp.c
+++ b/drivers/gpu/drm/lima/lima_pp.c
@@ -383,9 +383,10 @@ int lima_pp_pipe_init(struct lima_device *dev)
 		frame_size = sizeof(struct drm_lima_m450_pp_frame);
 
 	if (!lima_pp_task_slab) {
-		lima_pp_task_slab = kmem_cache_create(
+		lima_pp_task_slab = kmem_cache_create_usercopy(
 			"lima_pp_task", sizeof(struct lima_sched_task) + frame_size,
-			0, SLAB_HWCACHE_ALIGN, NULL);
+			0, SLAB_HWCACHE_ALIGN, sizeof(struct lima_sched_task),
+			frame_size, NULL);
 		if (!lima_pp_task_slab)
 			return -ENOMEM;
 	}