Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alexey Charkov" <alchark@flipper.net>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 1/4] regulator: of: fill in supply names in of_regulator_bulk_get_all()
Date: Tue, 29 Sep 2026 10:16:53 +0000	[thread overview]
Message-ID: <20260929101654.10C1C1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260929-regulator-get-all-v1-1-e887c66a47f1@flipper.net>

> of_regulator_bulk_get_all() returns an array it allocated itself, and
> fills in only the consumer of each entry. Every other way of getting a
> bulk array has the supply name set, because the caller provides it, and
> the core expects it to be there: regulator_bulk_enable() prints it when
> a supply fails to enable, so a caller that hands such an array to it
> dereferences uninitialised memory on that path.
> 
> Copy each name into the array's own allocation, right behind the
> entries, so that it shares the array's lifetime and callers still have
> nothing extra to free. That also retires the fixed 64 byte stack buffer
> the names were assembled in, which is_supply_name() never bounded the
> copy against.
> 
> Cc: stable@vger.kernel.org
> Reported-by: Sashiko <sashiko-bot@kernel.org>
> Closes: https://sashiko.dev/#/patchset/20260928-b4-rk3576-reboot-mode-v1-0-65486b03bd41@flipper.net?part=3
> Fixes: 27b9ecc7a9ba ("regulator: Add of_regulator_bulk_get_all")
> Signed-off-by: Alexey Charkov <alchark@flipper.net>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260929-regulator-get-all-v1-0-e887c66a47f1@flipper.net?part=1


  reply	other threads:[~2026-09-29 10:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29 10:05 [PATCH 0/4] regulator: of: Fixes to of_regulator_bulk_get_all() Alexey Charkov
2026-09-29 10:05 ` [PATCH 1/4] regulator: of: fill in supply names in of_regulator_bulk_get_all() Alexey Charkov
2026-09-29 10:16   ` sashiko-bot [this message]
2026-09-29 10:05 ` [PATCH 2/4] regulator: of: state who owns the array from of_regulator_bulk_get_all() Alexey Charkov
2026-09-29 10:11   ` sashiko-bot
2026-09-29 10:05 ` [PATCH 3/4] power: sequencing: pcie-m2: Fix leaking " Alexey Charkov
2026-09-29 10:13   ` sashiko-bot
2026-09-29 10:05 ` [PATCH 4/4] PCI/pwrctrl: generic: " Alexey Charkov
2026-09-29 10:12   ` sashiko-bot
2026-10-01  7:52   ` Bartosz Golaszewski
2026-10-01 16:46   ` Bjorn Helgaas
2026-10-01 16:51     ` Bjorn Helgaas
2026-09-29 15:31 ` [PATCH 0/4] regulator: of: Fixes to of_regulator_bulk_get_all() Mark Brown

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=20260929101654.10C1C1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alchark@flipper.net \
    --cc=linux-pci@vger.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