From: Paul Walmsley <pjw@kernel.org>
To: XianLiang Huang <huangxianliang@lanxincomputing.com>
Cc: tjeznach@rivosinc.com, markus.elfring@web.de, joro@8bytes.org,
will@kernel.org, robin.murphy@arm.com, paul.walmsley@sifive.com,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
iommu@lists.linux.dev, linux-riscv@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 RESEND] iommu/riscv: check pte null pointer before use
Date: Thu, 25 Jun 2026 13:10:07 -0600 (MDT) [thread overview]
Message-ID: <4264ac5c-8968-24f7-4829-cfe30e8ac372@kernel.org> (raw)
In-Reply-To: <20250807033252.1613-1-huangxianliang@lanxincomputing.com>
Hi,
On Thu, 7 Aug 2025, XianLiang Huang wrote:
> The riscv_iommu_pte_fetch can return NULL when the provided iova is not
> yet mapped, the caller should check if the returned pointer is NULL or
> not, but riscv_iommu_iova_to_phys missed this, which will then lead to
> a kernel panic.
>
> Check the pointer before using it to avoid the bug. Now, when
> iova_to_phys is called with an unmapped iova, the kernel will not crash
> here.
>
> Fixes: 488ffbf18171 ("iommu/riscv: Paging domain support")
> Cc: Tomasz Jeznach <tjeznach@rivosinc.com>
> Signed-off-by: XianLiang Huang <huangxianliang@lanxincomputing.com>
Going through some of the Patchwork backlog. The code that this patch
changes no longer appears to exist. Care to take a look to see if
something like this is still appropriate?
thanks,
- Paul
prev parent reply other threads:[~2026-06-25 19:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-07 3:32 XianLiang Huang
2025-08-07 7:22 ` [PATCH v?] " Markus Elfring
2025-08-08 2:42 ` XianLiang Huang
2025-08-08 7:21 ` [v?] " Markus Elfring
2026-06-25 19:10 ` Paul Walmsley [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=4264ac5c-8968-24f7-4829-cfe30e8ac372@kernel.org \
--to=pjw@kernel.org \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=huangxianliang@lanxincomputing.com \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=markus.elfring@web.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robin.murphy@arm.com \
--cc=tjeznach@rivosinc.com \
--cc=will@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®