Displaying 3 results from an estimated 3 matches for "249881232e14".
2024 Mar 06
1
[PATCH v3] nouveau/dmem: handle kcalloc() allocation failure
...PU is going away. If the kcalloc() fails, we could not
evict all pages mapping a chunk. So this patch adds a __GFP_NOFAIL
flag in kcalloc().
Finally, as there is no need to have physically contiguous memory,
this patch switches kcalloc() to kvcalloc() in order to avoid
failing allocations.
Fixes: 249881232e14 ("nouveau/dmem: evict device private memory during release")
Suggested-by: Danilo Krummrich <dakr at redhat.com>
Signed-off-by: Duoming Zhou <duoming at zju.edu.cn>
---
Changes in v3:
- Switch kcalloc() to kvcalloc().
drivers/gpu/drm/nouveau/nouveau_dmem.c | 12 ++++++-----...
2024 Mar 08
0
[PATCH v3] nouveau/dmem: handle kcalloc() allocation failure
..., we could not
> evict all pages mapping a chunk. So this patch adds a __GFP_NOFAIL
> flag in kcalloc().
>
> Finally, as there is no need to have physically contiguous memory,
> this patch switches kcalloc() to kvcalloc() in order to avoid
> failing allocations.
>
> Fixes: 249881232e14 ("nouveau/dmem: evict device private memory during release")
> Suggested-by: Danilo Krummrich <dakr at redhat.com>
> Signed-off-by: Duoming Zhou <duoming at zju.edu.cn>
Applied to drm-misc-fixes, thanks!
> ---
> Changes in v3:
> - Switch kcalloc() to kvcall...
2024 Mar 03
1
[PATCH] nouveau/dmem: handle kcalloc() allocation failure
The kcalloc() in nouveau_dmem_evict_chunk() will return null if
the physical memory has run out. As a result, if we dereference
src_pfns, dst_pfns or dma_addrs, the null pointer dereference bugs
will happen.
This patch uses stack variables to replace the kcalloc().
Fixes: 249881232e14 ("nouveau/dmem: evict device private memory during release")
Signed-off-by: Duoming Zhou <duoming at zju.edu.cn>
---
drivers/gpu/drm/nouveau/nouveau_dmem.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/dri...