From: Zhi Wang <zhiw@nvidia.com>
To: Dan Carpenter <dan.carpenter@linaro.org>
Cc: Lyude Paul <lyude@redhat.com>, Danilo Krummrich <dakr@kernel.org>,
"David Airlie" <airlied@gmail.com>,
Simona Vetter <simona@ffwll.ch>, Timur Tabi <ttabi@nvidia.com>,
Dave Airlie <airlied@redhat.com>, Ben Skeggs <bskeggs@nvidia.com>,
<dri-devel@lists.freedesktop.org>,
<nouveau@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH next] drm/nouveau: Fix error pointer dereference in r535_gsp_msgq_recv()
Date: Mon, 17 Feb 2025 16:56:33 +0200 [thread overview]
Message-ID: <20250217165633.00004d13@nvidia.com> (raw)
In-Reply-To: <b7052ac0-98e4-433b-ad58-f563bf51858c@stanley.mountain>
On Mon, 17 Feb 2025 10:31:21 +0300
Dan Carpenter <dan.carpenter@linaro.org> wrote:
Thanks for catching this!
Acked-by: Zhi Wang <zhiw@nvidia.com>
> If "rpc" is an error pointer then return directly. Otherwise it leads
> to an error pointer dereference.
>
> Fixes: 50f290053d79 ("drm/nouveau: support handling the return of large GSP message")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> index 2075cad63805..db2602e88006 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/gsp/r535.c
> @@ -348,6 +348,7 @@ r535_gsp_msgq_recv(struct nvkm_gsp *gsp, u32 gsp_rpc_len, int *retries)
> if (IS_ERR(buf)) {
> kvfree(info.gsp_rpc_buf);
> info.gsp_rpc_buf = NULL;
> + return buf;
> }
>
> if (expected <= max_rpc_size)
next prev parent reply other threads:[~2025-02-17 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 7:31 [PATCH next] drm/nouveau: Fix error pointer dereference in r535_gsp_msgq_recv() Dan Carpenter
2025-02-17 14:56 ` Zhi Wang [this message]
2025-02-19 14:02 ` Danilo Krummrich
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=20250217165633.00004d13@nvidia.com \
--to=zhiw@nvidia.com \
--cc=airlied@gmail.com \
--cc=airlied@redhat.com \
--cc=bskeggs@nvidia.com \
--cc=dakr@kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=nouveau@lists.freedesktop.org \
--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.