* Re: [PATCH v2] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc()
[not found] <20250813125412.96178-1-rongqianfeng@vivo.com>
@ 2025-08-14 12:41 ` Markus Elfring
2025-08-15 20:57 ` Danilo Krummrich
1 sibling, 0 replies; 2+ messages in thread
From: Markus Elfring @ 2025-08-14 12:41 UTC (permalink / raw)
To: Qianfeng Rong, nouveau, dri-devel, Danilo Krummrich, Dave Airlie,
Lyude Paul, Simona Vetter, Timur Tabi, Zhi Wang
Cc: LKML, David Airlie
> Replace kfree() with kvfree() for memory allocated by kvmalloc().
* Would you like to improve the exception handling by using another goto chain?
* How do you think about to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v6.16/source/include/linux/slab.h#L1081
Is there a need to adjust also the following statement combination?
https://elixir.bootlin.com/linux/v6.16/source/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c#L312-L314
…
kvfree(info.gsp_rpc_buf);
info.gsp_rpc_buf = NULL;
return buf;
…
Regards,
Markus
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc()
[not found] <20250813125412.96178-1-rongqianfeng@vivo.com>
2025-08-14 12:41 ` [PATCH v2] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc() Markus Elfring
@ 2025-08-15 20:57 ` Danilo Krummrich
1 sibling, 0 replies; 2+ messages in thread
From: Danilo Krummrich @ 2025-08-15 20:57 UTC (permalink / raw)
To: Qianfeng Rong
Cc: Lyude Paul, David Airlie, Simona Vetter, Dave Airlie, Timur Tabi,
Ben Skeggs, Zhi Wang, dri-devel, nouveau, linux-kernel, stable
On 8/13/25 2:54 PM, Qianfeng Rong wrote:
> Replace kfree() with kvfree() for memory allocated by kvmalloc().
>
> Compile-tested only.
>
> Cc: stable@vger.kernel.org
> Fixes: 8a8b1ec5261f ("drm/nouveau/gsp: split rpc handling out on its own")
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> Reviewed-by: Timur Tabi <ttabi@nvidia.com>
> Acked-by: Zhi Wang <zhiw@nvidia.com>
Applied to drm-misc-fixes, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-08-15 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20250813125412.96178-1-rongqianfeng@vivo.com>
2025-08-14 12:41 ` [PATCH v2] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc() Markus Elfring
2025-08-15 20:57 ` Danilo Krummrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).