Skip to content

Commit e84b043

Browse files
PhilipYangAgregkh
authored andcommitted
drm/amdkfd: Don't take process mutex for svm ioctls
[ Upstream commit ac7c48c ] SVM ioctls take proper svms->lock to handle race conditions, don't need take process mutex to serialize ioctls. This also fixes circular locking warning: WARNING: possible circular locking dependency detected Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&svms->deferred_list_work)); lock(&process->mutex); lock((work_completion)(&svms->deferred_list_work)); lock(&process->mutex); *** DEADLOCK *** Signed-off-by: Philip Yang <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 1eb5980 commit e84b043

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_chardev.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1807,13 +1807,9 @@ static int kfd_ioctl_svm(struct file *filep, struct kfd_process *p, void *data)
18071807
if (!args->start_addr || !args->size)
18081808
return -EINVAL;
18091809

1810-
mutex_lock(&p->mutex);
1811-
18121810
r = svm_ioctl(p, args->op, args->start_addr, args->size, args->nattr,
18131811
args->attrs);
18141812

1815-
mutex_unlock(&p->mutex);
1816-
18171813
return r;
18181814
}
18191815
#else

0 commit comments

Comments
 (0)