From: "Rob Herring (Arm)" <robh@kernel.org>
To: Carlo Caione <ccaione@baylibre.com>
Cc: stable@vger.kernel.org, Saravana Kannan <saravanak@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Catalin Marinas <catalin.marinas@arm.com>,
Nicolas Saenz Julienne <nsaenz@kernel.org>
Subject: Re: [PATCH v3] of/address: Fix NULL bus dereference in of_pci_range_parser_one()
Date: Tue, 28 Jul 2026 10:34:39 -0500 [thread overview]
Message-ID: <178525287796.2235178.8797217892783913753.robh@kernel.org> (raw)
In-Reply-To: <20260727-of-range-parser-null-bus-v3-1-be01b708a4ce@baylibre.com>
On Mon, 27 Jul 2026 10:36:59 +0200, Carlo Caione wrote:
> The bus matching rework made of_match_bus() return NULL for nodes with
> ranges/dma-ranges but no local #address-cells. parser_init() stored that
> NULL bus, and the range iterator later dereferenced it.
>
> Reject such nodes in parser_init(), leaving an explicit empty
> iterator for callers that ignore the init return, and make
> of_dma_get_max_cpu_address() honour the init failure so a rejected node
> cannot clamp the DMA limit.
>
> Fixes: 64ee3cf096ac ("of/address: Rework bus matching to avoid warnings")
> Cc: stable@vger.kernel.org
> Signed-off-by: Carlo Caione <ccaione@baylibre.com>
> ---
> Changes in v3:
> - Drop the of_range_count() hunk in of_dma_get_max_cpu_address(): it
> guarded a pre-existing corner, not this regression (Rob)
> - Link to v2: https://lore.kernel.org/r/20260706114731.57353-1-ccaione@baylibre.com
>
> Changes in v2:
> - Validate na/pna/ns in parser_init() with OF_CHECK_COUNTS() /
> OF_CHECK_ADDR_COUNT()
> - Link to v1: https://lore.kernel.org/r/20260706095651.48839-1-ccaione@baylibre.com
> ---
> drivers/of/address.c | 22 ++++++++++++++++------
> 1 file changed, 16 insertions(+), 6 deletions(-)
>
Applied, thanks!
prev parent reply other threads:[~2026-07-28 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 8:36 Carlo Caione
2026-07-28 15:34 ` Rob Herring (Arm) [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=178525287796.2235178.8797217892783913753.robh@kernel.org \
--to=robh@kernel.org \
--cc=catalin.marinas@arm.com \
--cc=ccaione@baylibre.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nsaenz@kernel.org \
--cc=saravanak@kernel.org \
--cc=stable@vger.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®