drm/ttm: fix missing NULL check in the new page pool
Subsystems (3)
PATCH 1/1 drm/ttm: fix missing NULL check in the new page pool
The pool parameter can be NULL if we free through the shrinker.
--- drivers/gpu/drm/ttm/ttm_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/ttm/ttm_pool.c +1 -1
@@ -135,7 +135,7 @@ static void ttm_pool_free_page(struct ttm_pool *pool, enum ttm_caching caching,set_pages_wb (p,1 << order);#endif -if (!pool->use_dma_alloc) { +if (!pool || !pool->use_dma_alloc) {__free_pages (p, order);return ; }
Signature · 6 lines
2.25.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Christian König
The pool parameter can be NULL if we free through the shrinker.
Signed-off-by Christian König <[email protected]>
Does this fix:
https://gitlab.freedesktop.org/drm/amd/-/issues/1362
Quoted 20 lines
--- drivers/gpu/drm/ttm/ttm_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_pool.c +1
-2@@ -135,7 +135,7 @@ static void ttm_pool_free_page(struct ttm_pool *pool, enum ttm_caching caching,set_pages_wb (p,1 << order);#endif -if (!pool->use_dma_alloc) { +if (!pool || !pool->use_dma_alloc) {__free_pages (p, order);return ; } --2.25.1
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Alex Deucher
Quoted 4 lines · Christian König
The pool parameter can be NULL if we free through the shrinker.
Signed-off-by Christian König <[email protected]>Does this fix:
https://gitlab.freedesktop.org/drm/amd/-/issues/1362
It does! So you can add my:
Thanks,
Martin
Quoted 25 lines
Acked-by Alex Deucher <[email protected]>Quoted 20 lines
--- drivers/gpu/drm/ttm/ttm_pool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/ttm/ttm_pool.c +1
-2@@ -135,7 +135,7 @@ static void ttm_pool_free_page(struct ttm_pool *pool, enum ttm_caching caching,set_pages_wb (p,1 << order);#endif -if (!pool->use_dma_alloc) { +if (!pool || !pool->use_dma_alloc) {__free_pages (p, order);return ; } --2.25.1
Quoted 9 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel