diff options
| author | Luben Tuikov <luben.tuikov@amd.com> | 2021-04-13 15:31:59 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2021-04-15 23:32:44 +0300 |
| commit | 80b0cd0fb97ec3c02b0f2c4dc26fe3e8be94dc01 (patch) | |
| tree | 6eef3ca5488d4cfa1245c1584b0398884d9812b8 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
| parent | 6cb7a1d40acb2425b9dabb99cdaf522bf47295cb (diff) | |
| download | linux-80b0cd0fb97ec3c02b0f2c4dc26fe3e8be94dc01.tar.xz | |
drm/amdgpu: Fix a bug in checking the result of reserve page
Fix if (ret) --> if (!ret), a bug, for
"retire_page", which caused the kernel to recall
the method with *pos == end of file, and that
bounced back with error. On the first run, we
advanced *pos, but returned 0 back to fs layer,
also a bug.
Fix the logic of the check of the result of
amdgpu_reserve_page_direct()--it is 0 on success,
and non-zero on error, not the other way
around. This patch fixes this bug.
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions
