artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec800cb
)
drm/ttm: Fix dummy res NULL ptr deref bug
author
jsg
<jsg@openbsd.org>
Thu, 25 Aug 2022 23:49:31 +0000
(23:49 +0000)
committer
jsg
<jsg@openbsd.org>
Thu, 25 Aug 2022 23:49:31 +0000
(23:49 +0000)
From Arunpravin Paneer Selvam
76672cd326c146ded2c2712ff257b8908dcf23d8
in linux 5.15.y/5.15.63
cf4b7387c0a842d64bdd7c353e6d3298174a7740
in mainline linux
sys/dev/pci/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/ttm/ttm_bo.c
b/sys/dev/pci/drm/ttm/ttm_bo.c
index
d66b834
..
81d9aea
100644
(file)
--- a/
sys/dev/pci/drm/ttm/ttm_bo.c
+++ b/
sys/dev/pci/drm/ttm/ttm_bo.c
@@
-987,7
+987,7
@@
int ttm_bo_validate(struct ttm_buffer_object *bo,
/*
* We might need to add a TTM.
*/
- if (bo->resource->mem_type == TTM_PL_SYSTEM) {
+ if (
!bo->resource ||
bo->resource->mem_type == TTM_PL_SYSTEM) {
ret = ttm_tt_create(bo, true);
if (ret)
return ret;