public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Orson Zhai <orsonzhai@gmail.com>,
	 Baolin Wang <baolin.wang@linux.alibaba.com>,
	 Chunyan Zhang <zhang.lyra@gmail.com>, Felix Gu <gu_0233@qq.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] spi: spi-sprd-adi: Fix double free in probe error path
Date: Tue, 13 Jan 2026 11:42:52 +0000	[thread overview]
Message-ID: <176830457213.25724.9815535994112539882.b4-ty@kernel.org> (raw)
In-Reply-To: <tencent_AC7D389CE7E24318445E226F7CDCCC2F0D07@qq.com>

On Fri, 09 Jan 2026 20:49:53 +0800, Felix Gu wrote:
> The driver currently uses spi_alloc_host() to allocate the controller
> but registers it using devm_spi_register_controller().
> 
> If devm_register_restart_handler() fails, the code jumps to the
> put_ctlr label and calls spi_controller_put(). However, since the
> controller was registered via a devm function, the device core will
> automatically call spi_controller_put() again when the probe fails.
> This results in a double-free of the spi_controller structure.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: spi-sprd-adi: Fix double free in probe error path
      commit: 383d4f5cffcc8df930d95b06518a9d25a6d74aac

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark


  parent reply	other threads:[~2026-01-13 11:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-09 12:49 [PATCH v2] spi: spi-sprd-adi: Fix double free in probe error path Felix Gu
2026-01-09 17:40 ` Markus Elfring
2026-01-13 11:42 ` Mark Brown [this message]
2026-01-13 19:20   ` Markus Elfring
2026-01-13 19:25     ` 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=176830457213.25724.9815535994112539882.b4-ty@kernel.org \
    --to=broonie@kernel.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=gu_0233@qq.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=zhang.lyra@gmail.com \
    /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