From: sashiko-bot@kernel.org
To: "Alex Elder" <elder@riscstar.com>
Cc: conor+dt@kernel.org, robh@kernel.org, linux-pci@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v5 1/4] PCI: of: avoid allocations in of_pci_prop_compatible()
Date: Tue, 08 Sep 2026 21:40:46 +0000 [thread overview]
Message-ID: <20260908214047.0CB251F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908213459.2519059-2-elder@riscstar.com>
> Three compatible strings are formatted in of_pci_prop_compatible().
> Their sizes are known in advance, and the largest is 16 bytes.
>
> Rather than dynamically allocating the space for those strings, just
> set aside a buffer on the stack large enough to hold all three.
>
> This avoids a problem that Sashiko pointed out, where an allocation
> failure would cause subsequent crash because strlen() is called
> unconditionally in of_changeset_add_prop_string_array().
>
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Link: https://lore.kernel.org/sashiko-reviews/a647bd56-7dc8-4fec-9d96-834622054cdf@riscstar.com
> Signed-off-by: Alex Elder <elder@riscstar.com>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260908213459.2519059-1-elder@riscstar.com?part=1
next prev parent reply other threads:[~2026-09-08 21:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-08 21:34 [PATCH v5 0/4] PCI: of: warn on bogus device_type property Alex Elder
2026-09-08 21:34 ` [PATCH v5 1/4] PCI: of: avoid allocations in of_pci_prop_compatible() Alex Elder
2026-09-08 21:40 ` sashiko-bot [this message]
2026-09-08 21:34 ` [PATCH v5 2/4] PCI: of: drop the reg_num argument to of_pci_set_address() Alex Elder
2026-09-08 21:46 ` sashiko-bot
2026-09-09 13:02 ` Alex Elder
2026-09-08 21:34 ` [PATCH v5 3/4] PCI: of: don't zero flags in of_pci_get_addr_flags() Alex Elder
2026-09-08 21:38 ` sashiko-bot
2026-09-08 21:34 ` [PATCH v5 4/4] PCI: of: introduce of_pci_verify_node() Alex Elder
2026-09-08 21:39 ` sashiko-bot
2026-09-09 16:37 ` Bjorn Helgaas
2026-09-09 17:23 ` Alex Elder
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=20260908214047.0CB251F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=elder@riscstar.com \
--cc=linux-pci@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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