diff options
author | 2019-11-11 13:35:55 +0000 | |
---|---|---|
committer | 2019-11-11 13:35:55 +0000 | |
commit | 2c1a65eb39c765c0328833b5664282e56c6ee273 (patch) | |
tree | d4a83aa21e8d1adf5d4543a825b1d71ebe2e2bbd /sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c | |
parent | Also implement "trusted" for sensors; do not do constraint validation (diff) | |
download | wireguard-openbsd-2c1a65eb39c765c0328833b5664282e56c6ee273.tar.xz wireguard-openbsd-2c1a65eb39c765c0328833b5664282e56c6ee273.zip |
drm/amdgpu: fix potential VM faults
From Christian Koenig
1df8da335d40e3037d7207c47102b4edff0f3446 in linux 4.19.y/4.19.83
3122051edc7c27cc08534be730f4c7c180919b8a in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c index 30ed93252bf..38fe365b5d9 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_object.c @@ -428,7 +428,8 @@ static int amdgpu_bo_do_create(struct amdgpu_device *adev, .interruptible = (bp->type != ttm_bo_type_kernel), .no_wait_gpu = false, .resv = bp->resv, - .flags = TTM_OPT_FLAG_ALLOW_RES_EVICT + .flags = bp->type != ttm_bo_type_kernel ? + TTM_OPT_FLAG_ALLOW_RES_EVICT : 0 }; struct amdgpu_bo *bo; unsigned long page_align, size = bp->size; |