artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a682ea7
)
drm/amdgpu: Fix possible NULL dereference in amdgpu_ras_query_error_status_helper()
author
jsg
<jsg@openbsd.org>
Mon, 27 May 2024 00:54:00 +0000
(
00:54
+0000)
committer
jsg
<jsg@openbsd.org>
Mon, 27 May 2024 00:54:00 +0000
(
00:54
+0000)
From Srinivasan Shanmugam
c364e7a34c85c2154fb2e47561965d5b5a0b69b1
in linux-6.6.y/6.6.32
b8d55a90fd55b767c25687747e2b24abd1ef8680
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
index
65db7e2
..
36af1f4
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_ras.c
@@
-1029,6
+1029,9
@@
int amdgpu_ras_query_error_status(struct amdgpu_device *adev,
if (!obj)
return -EINVAL;
+ if (!info || info->head.block == AMDGPU_RAS_BLOCK_COUNT)
+ return -EINVAL;
+
if (info->head.block == AMDGPU_RAS_BLOCK__UMC) {
amdgpu_ras_get_ecc_info(adev, &err_data);
} else {