diff options
| author | Nicolai Hähnle <[email protected]> | 2017-02-14 08:37:12 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2017-03-30 03:53:05 +0000 |
| commit | c2c139cf435b18939204800fa72c53a7207bdd68 (patch) | |
| tree | 08b8a88fd40b7ceb4e3c82c7c74eeeb0f5ea3f29 /drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |
| parent | drm/amdgpu: expose GPU sensor related information (diff) | |
| download | kernel-c2c139cf435b18939204800fa72c53a7207bdd68.tar.gz kernel-c2c139cf435b18939204800fa72c53a7207bdd68.zip | |
drm/ttm: never add BO that failed to validate to the LRU list
Fixes a potential race condition in amdgpu that looks as follows:
Task 1: attempt ttm_bo_init, but ttm_bo_validate fails
Task 1: add BO to global list anyway
Task 2: grabs hold of the BO, waits on its reservation lock
Task 1: releases its reference of the BO; never gives up the
reservation lock
The patch "drm/amdgpu: fix a potential deadlock in
amdgpu_bo_create_restricted()" attempts to fix that by releasing
the reservation lock in amdgpu code; unfortunately, it introduces
a use-after-free when this race _doesn't_ happen.
This patch should fix the race properly by never adding the BO
to the global list in the first place.
Cc: zhoucm1 <[email protected]>
Signed-off-by: Nicolai Hähnle <[email protected]>
Tested-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_object.c')
0 files changed, 0 insertions, 0 deletions
