artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b4ddd0
)
drm/ttm: add a check against null pointer dereference
author
jsg
<jsg@openbsd.org>
Sat, 31 Jul 2021 06:37:43 +0000
(06:37 +0000)
committer
jsg
<jsg@openbsd.org>
Sat, 31 Jul 2021 06:37:43 +0000
(06:37 +0000)
From Zheyu Ma
5c3d753b872a706af9317fef4edfb6b640d8a71e
in linux 5.10.y/5.10.55
9e5c772954406829e928dbe59891d08938ead04b
in mainline linux
sys/dev/pci/drm/ttm/ttm_range_manager.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/ttm/ttm_range_manager.c
b/sys/dev/pci/drm/ttm/ttm_range_manager.c
index
bf3e704
..
72e8253
100644
(file)
--- a/
sys/dev/pci/drm/ttm/ttm_range_manager.c
+++ b/
sys/dev/pci/drm/ttm/ttm_range_manager.c
@@
-147,6
+147,9
@@
int ttm_range_man_fini(struct ttm_bo_device *bdev,
struct drm_mm *mm = &rman->mm;
int ret;
+ if (!man)
+ return 0;
+
ttm_resource_manager_set_used(man, false);
ret = ttm_resource_manager_force_list_clean(bdev, man);