* [PATCH] drm/ttm: fix missing NULL check in the new page pool
@ 2020-11-06 14:10 Christian König
2020-11-09 15:54 ` Alex Deucher
0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2020-11-06 14:10 UTC (permalink / raw)
To: andy.lavr, dri-devel
The pool parameter can be NULL if we free through the shrinker.
Signed-off-by: Christian König <christian.koenig@amd.com>
---
drivers/gpu/drm/ttm/ttm_pool.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
index 44ec41aa78d6..1b96780b4989 100644
--- a/drivers/gpu/drm/ttm/ttm_pool.c
+++ b/drivers/gpu/drm/ttm/ttm_pool.c
@@ -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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/ttm: fix missing NULL check in the new page pool
2020-11-06 14:10 [PATCH] drm/ttm: fix missing NULL check in the new page pool Christian König
@ 2020-11-09 15:54 ` Alex Deucher
2020-11-10 7:30 ` Martin Peres
0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2020-11-09 15:54 UTC (permalink / raw)
To: Christian König; +Cc: andy.lavr, Maling list - DRI developers
On Fri, Nov 6, 2020 at 9:10 AM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> The pool parameter can be NULL if we free through the shrinker.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Does this fix:
https://gitlab.freedesktop.org/drm/amd/-/issues/1362
Acked-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> drivers/gpu/drm/ttm/ttm_pool.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
> index 44ec41aa78d6..1b96780b4989 100644
> --- a/drivers/gpu/drm/ttm/ttm_pool.c
> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
> @@ -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
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/ttm: fix missing NULL check in the new page pool
2020-11-09 15:54 ` Alex Deucher
@ 2020-11-10 7:30 ` Martin Peres
0 siblings, 0 replies; 3+ messages in thread
From: Martin Peres @ 2020-11-10 7:30 UTC (permalink / raw)
To: Alex Deucher, Christian König
Cc: andy.lavr, Maling list - DRI developers
On 09/11/2020 17:54, Alex Deucher wrote:
> On Fri, Nov 6, 2020 at 9:10 AM Christian König
> <ckoenig.leichtzumerken@gmail.com> wrote:
>>
>> The pool parameter can be NULL if we free through the shrinker.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>
> Does this fix:
> https://gitlab.freedesktop.org/drm/amd/-/issues/1362
It does! So you can add my:
Tested-by: Martin Peres <martin.peres@mupuf.org>
Acked-by: Martin Peres <martin.peres@mupuf.org>
Thanks,
Martin
>
> Acked-by: Alex Deucher <alexander.deucher@amd.com>
>
>
>
>> ---
>> drivers/gpu/drm/ttm/ttm_pool.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/ttm/ttm_pool.c b/drivers/gpu/drm/ttm/ttm_pool.c
>> index 44ec41aa78d6..1b96780b4989 100644
>> --- a/drivers/gpu/drm/ttm/ttm_pool.c
>> +++ b/drivers/gpu/drm/ttm/ttm_pool.c
>> @@ -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
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-11-10 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 14:10 [PATCH] drm/ttm: fix missing NULL check in the new page pool Christian König
2020-11-09 15:54 ` Alex Deucher
2020-11-10 7:30 ` Martin Peres
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.