diff options
| author | Mohammed Anees <[email protected]> | 2024-10-09 12:28:31 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2024-10-15 15:48:05 +0000 |
| commit | c0ec082f10b7a1fd25e8c1e2a686440da913b7a3 (patch) | |
| tree | e2fb19fefe53aa8a4471b27a771da4b7080fa9c7 | |
| parent | drm/amdgpu: enable enforce_isolation sysfs node on VFs (diff) | |
| download | kernel-c0ec082f10b7a1fd25e8c1e2a686440da913b7a3.tar.gz kernel-c0ec082f10b7a1fd25e8c1e2a686440da913b7a3.zip | |
drm/amdgpu: prevent BO_HANDLES error from being overwritten
Before this patch, if multiple BO_HANDLES chunks were submitted,
the error -EINVAL would be correctly set but could be overwritten
by the return value from amdgpu_cs_p1_bo_handles(). This patch
ensures that if there are multiple BO_HANDLES, we stop.
Fixes: fec5f8e8c6bc ("drm/amdgpu: disallow multiple BO_HANDLES chunks in one submit")
Signed-off-by: Mohammed Anees <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Pierre-Eric Pelloux-Prayer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
(cherry picked from commit 40f2cd98828f454bdc5006ad3d94330a5ea164b7)
Cc: [email protected]
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index 1e475eb01417..d891ab779ca7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c @@ -265,7 +265,7 @@ static int amdgpu_cs_pass1(struct amdgpu_cs_parser *p, /* Only a single BO list is allowed to simplify handling. */ if (p->bo_list) - ret = -EINVAL; + goto free_partial_kdata; ret = amdgpu_cs_p1_bo_handles(p, p->chunks[i].kdata); if (ret) |
