drm: Branch 'master'
[email protected] (GitLab Mirror) Fri, 12 Apr 2019 16:39:07 +0000 (UTC)
| Newsgroups | gmane.comp.video.dri.patches |
|---|---|
| Message-ID | <[email protected]> |
tests/amdgpu/ras_tests.c | 1 + 1 file changed, 1 insertion(+) New commits: commit fcf80e2fd7741c9140e5e2971f9742fe7a82f68e Author: Pan, Xinhui <[email protected]> Date: Fri Apr 12 05:42:01 2019 +0000 amdgpu: Fix a structure initialization issue struct drmPciBusInfo has been aligned to 6 bytes. So memcmp will access the last byte which is not initialized. Reviewed-by: Alex Deucher <[email protected]> Signed-off-by: xinhui pan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> diff --git a/tests/amdgpu/ras_tests.c b/tests/amdgpu/ras_tests.c index 612ad1d7..81c34ad6 100644 --- a/tests/amdgpu/ras_tests.c +++ b/tests/amdgpu/ras_tests.c @@ -196,6 +196,7 @@ static int amdgpu_ras_lookup_id(drmDevicePtr device) for (i = 0; i < MAX_CARDS_SUPPORTED; i++) { memset(str, 0, sizeof(str)); + memset(&info, 0, sizeof(info)); sprintf(path, "/sys/kernel/debug/dri/%d/name", i); if (get_file_contents(path, str, sizeof(str)) <= 0) continue; --