artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe6a82e
)
drm/amdgpu: fix dereference null return value for the function amdgpu_vm_pt_parent
author
jsg
<jsg@openbsd.org>
Fri, 30 Aug 2024 04:03:30 +0000
(
04:03
+0000)
committer
jsg
<jsg@openbsd.org>
Fri, 30 Aug 2024 04:03:30 +0000
(
04:03
+0000)
From Jesse Zhang
3cc03d1dbdcf88d3c05578c286a2e8a07befac93
in linux-6.6.y/6.6.48
511a623fb46a6cf578c61d4f2755783c48807c77
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
index
8da9740
..
8c5e7d0
100644
(file)
--- a/
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
+++ b/
sys/dev/pci/drm/amd/amdgpu/amdgpu_vm_pt.c
@@
-766,11
+766,15
@@
int amdgpu_vm_pde_update(struct amdgpu_vm_update_params *params,
struct amdgpu_vm_bo_base *entry)
{
struct amdgpu_vm_bo_base *parent = amdgpu_vm_pt_parent(entry);
- struct amdgpu_bo *bo
= parent->bo
, *pbo;
+ struct amdgpu_bo *bo, *pbo;
struct amdgpu_vm *vm = params->vm;
uint64_t pde, pt, flags;
unsigned int level;
+ if (WARN_ON(!parent))
+ return -EINVAL;
+
+ bo = parent->bo;
for (level = 0, pbo = bo->parent; pbo; ++level)
pbo = pbo->parent;