From: Zhi Wang <zhiw@nvidia.com>
To: Qianfeng Rong <rongqianfeng@vivo.com>
Cc: Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@kernel.org>,
"David Airlie" <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>, Dave Airlie <airlied@redhat.com>,
Ben Skeggs <bskeggs@nvidia.com>, Timur Tabi <ttabi@nvidia.com>,
<dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc()
Date: Wed, 13 Aug 2025 13:46:22 +0300 [thread overview]
Message-ID: <20250813134622.000069a0@nvidia.com> (raw)
In-Reply-To: <20250811091910.404659-1-rongqianfeng@vivo.com>
On Mon, 11 Aug 2025 17:19:00 +0800
Qianfeng Rong <rongqianfeng@vivo.com> wrote:
Acked-by: Zhi Wang <zhiw@nvidia.com>
Please add a Fixes: tag.
> Replace kfree() with kvfree() for memory allocated by kvmalloc().
>
> Compile-tested only.
>
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c
> index 9d06ff722fea..0dc4782df8c0 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c
> @@ -325,7 +325,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
>
> rpc = r535_gsp_msgq_peek(gsp, sizeof(*rpc), info.retries);
> if (IS_ERR_OR_NULL(rpc)) {
> - kfree(buf);
> + kvfree(buf);
> return rpc;
> }
>
> @@ -334,7 +334,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
>
> rpc = r535_gsp_msgq_recv_one_elem(gsp, &info);
> if (IS_ERR_OR_NULL(rpc)) {
> - kfree(buf);
> + kvfree(buf);
> return rpc;
> }
>
next prev parent reply other threads:[~2025-08-13 10:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 9:19 [PATCH] drm/nouveau/gsp: fix mismatched alloc/free for kvmalloc() Qianfeng Rong
2025-08-12 22:52 ` Timur Tabi
2025-08-13 11:00 ` Danilo Krummrich
2025-08-13 14:02 ` Timur Tabi
2025-08-13 11:01 ` Zhi Wang
2025-08-13 10:46 ` Zhi Wang [this message]
2025-08-13 11:01 ` Danilo Krummrich
2025-08-13 11:37 ` Qianfeng Rong
2025-08-13 12:23 ` Markus Elfring
2025-08-13 12:56 ` Markus Elfring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250813134622.000069a0@nvidia.com \
--to=zhiw@nvidia.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=bskeggs@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--cc=rongqianfeng@vivo.com \
--cc=simona@ffwll.ch \
--cc=ttabi@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.