diff options
author | Christoph Hellwig <[email protected]> | 2020-06-11 17:34:58 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-06-11 18:17:48 -0700 |
commit | 8449d150e66c43fd9bfd77691a56327dfdccedd7 (patch) | |
tree | 7e254d6d4de06ebb0e160125e9b476d9b8c5d2ed | |
parent | b5265c813ce4efbfa2e46fd27cdf9a7f44a35d2e (diff) |
amdgpu: a NULL ->mm does not mean a thread is a kthread
Use the proper API instead.
Fixes: 70539bd795002 ("drm/amd: Update MEC HQD loading code for KFD")
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Tested-by: Jens Axboe <[email protected]>
Reviewed-by: Felix Kuehling <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Cc: Al Viro <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: Zhenyu Wang <[email protected]>
Cc: Zhi Wang <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h index 142746836838..ffe149aafc39 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h @@ -196,7 +196,7 @@ uint8_t amdgpu_amdkfd_get_xgmi_hops_count(struct kgd_dev *dst, struct kgd_dev *s pagefault_disable(); \ if ((mmptr) == current->mm) { \ valid = !get_user((dst), (wptr)); \ - } else if (current->mm == NULL) { \ + } else if (current->flags & PF_KTHREAD) { \ kthread_use_mm(mmptr); \ valid = !get_user((dst), (wptr)); \ kthread_unuse_mm(mmptr); \ |