From: Mikko Perttunen <mperttunen@nvidia.com>
To: thierry.reding@kernel.org, airlied@gmail.com, simona@ffwll.ch,
Slavin Liu <bolin.liu@seu.edu.cn>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org, bolin.liu@seu.edu.cn
Subject: Re: [PATCH] gpu: host1x: skip trace payloads after mapping failure
Date: Mon, 14 Sep 2026 14:22:00 +0900 [thread overview]
Message-ID: <gIo8Vs5ARM2sxperdLO4aA@nvidia.com> (raw)
In-Reply-To: <20260913125128.109827-1-bolin.liu@seu.edu.cn>
On Sunday, September 13, 2026 9:51 PM Slavin Liu wrote:
> Command tracing maps the original buffer independently of job pinning.
> An ERR_PTR mapping is non-NULL but is not readable. Skip payload capture
> and unmapping when this diagnostic mapping fails.
>
> Detected by static analysis and reviewed with AI-assisted source auditing.
>
> Fixes: 3f257bc63c0d ("drm/tegra: gem: Do not return NULL in tegra_bo_mmap()")
> Assisted-by: LLM
> Signed-off-by: Slavin Liu <bolin.liu@seu.edu.cn>
> ---
> drivers/gpu/host1x/hw/channel_hw.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/host1x/hw/channel_hw.c b/drivers/gpu/host1x/hw/channel_hw.c
> index a8251ec0810c..19949c99c427 100644
> --- a/drivers/gpu/host1x/hw/channel_hw.c
> +++ b/drivers/gpu/host1x/hw/channel_hw.c
> @@ -28,7 +28,7 @@ static void trace_write_gather(struct host1x_cdma *cdma, struct host1x_bo *bo,
> if (host1x_debug_trace_cmdbuf)
> mem = host1x_bo_mmap(bo);
>
> - if (mem) {
> + if (!IS_ERR_OR_NULL(mem)) {
> u32 i;
> /*
> * Write in batches of 128 as there seems to be a limit
>
After the commit in Fixes:, host1x_bo_mmap should never return NULL
anymore. So IS_ERR() would be the proper macro to use.
Could you modify the patch to use it?
Thank you
Mikko
prev parent reply other threads:[~2026-09-14 5:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-13 12:51 Slavin Liu
2026-09-14 5:22 ` Mikko Perttunen [this message]
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=gIo8Vs5ARM2sxperdLO4aA@nvidia.com \
--to=mperttunen@nvidia.com \
--cc=airlied@gmail.com \
--cc=bolin.liu@seu.edu.cn \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=thierry.reding@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®