amdkfd: use atomic allocations within srcu callbacks
Subsystems (3)
PATCH 1/1 amdkfd: use atomic allocations within srcu callbacks
srcu callbacks are running in atomic context, we can't allocate using __GFP_WAIT.
Signed-off-by Sasha Levin <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/kfd_process.c +1 -1
@@ -196,7 +196,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu)mmdrop (p->mm); work = (struct kfd_process_release_work *) -kmalloc (sizeof (struct kfd_process_release_work ),GFP_KERNEL ); +kmalloc (sizeof (struct kfd_process_release_work ),GFP_ATOMIC );if (work) {INIT_WORK ((struct work_struct *) work, kfd_process_wq_release);
Signature · 1 line
2.1.0
Quoted 14 lines · Sasha Levin
srcu callbacks are running in atomic context, we can't allocate using
__GFP_WAIT.Signed-off-by Sasha Levin <[email protected]>--- drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/kfd_process.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_process.c static void kfd_process_destroy_delayed(struct rcu_head *rcu) · line 202
Quoted 8 lines
drivers/gpu/drm/amd/amdkfd/kfd_process.c +1
-1@@ -196,7 +196,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu)mmdrop (p->mm); work = (struct kfd_process_release_work *) -kmalloc (sizeof (struct kfd_process_release_work ),GFP_KERNEL ); +kmalloc (sizeof (struct kfd_process_release_work ),GFP_ATOMIC );if (work) {INIT_WORK ((struct work_struct *) work, kfd_process_wq_release);
Thanks!
Applied to my -next tree.
Oded
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel