mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: linux-spi@vger.kernel.org, shao.mingyin@zte.com.cn
Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
	 pjw@kernel.org, samuel.holland@sifive.com,
	william.zhang@broadcom.com,  kursad.oney@broadcom.com,
	jonas.gorski@gmail.com,  bcm-kernel-feedback-list@broadcom.com,
	anand.gore@broadcom.com,  florian.fainelli@broadcom.com,
	rafal@milecki.pl,  linux-arm-kernel@lists.infradead.org,
	sven@kernel.org, j@jannau.net,  neal@gompa.dev,
	asahi@lists.linux.dev, ryan.wanner@microchip.com,
	 nicolas.ferre@microchip.com, alexandre.belloni@bootlin.com,
	 claudiu.beznea@tuxon.dev
Subject: Re: [PATCH v2 0/5] spi: fix division by zero with a zero transfer speed
Date: Fri, 13 Nov 2026 22:07:23 +0000	[thread overview]
Message-ID: <179460764342.448985.18219249061160291658.b4-ty@b4> (raw)
In-Reply-To: <20261110233450305Smji446Uhvoxa7r8SHEgl@zte.com.cn>

On Tue, 10 Nov 2026 23:34:50 +0800, shao.mingyin@zte.com.cn wrote:
> spi: fix division by zero with a zero transfer speed
> 
> Five SPI controller drivers compute a clock divider from the transfer
> speed without checking that it is non-zero.  A SPI device whose
> max_speed_hz is zero (a DT node without spi-max-frequency, or a device
> created through the spidev sysfs new_device interface without a speed)
> therefore reaches the division with speed_hz == 0.  The SPI core clamps
> such a device to the controller limit only when host->max_speed_hz is
> set, and none of these five drivers sets it.
> 
> [...]

Applied to

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

Thanks!

[1/5] spi: sifive: clamp the clock divider to the register range
      https://git.kernel.org/broonie/spi/c/49071cdbecd3
[2/5] spi: bcm63xx-hsspi: fix division by zero for devices without a max speed
      https://git.kernel.org/broonie/spi/c/82ff536b6049
[3/5] spi: bcmbca-hsspi: fix division by zero for devices without a max speed
      https://git.kernel.org/broonie/spi/c/167fe08d3ba5
[4/5] spi: apple: fix division by zero in clock divisor calculation
      https://git.kernel.org/broonie/spi/c/ee22df21fdf4
[5/5] spi: atmel: use the maximum divider for an unspecified speed
      https://git.kernel.org/broonie/spi/c/51953948d6a8

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-11-14  0:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 15:34 shao.mingyin
2026-11-10 15:34 ` [PATCH v2 1/5] spi: sifive: clamp the clock divider to the register range shao.mingyin
2026-11-10 15:34 ` [PATCH v2 2/5] spi: bcm63xx-hsspi: fix division by zero for devices without a max speed shao.mingyin
2026-11-10 15:34 ` [PATCH v2 3/5] spi: bcmbca-hsspi: " shao.mingyin
2026-11-10 20:30   ` William Zhang
2026-11-11  9:36     ` shao.mingyin
2026-11-14  0:51       ` Mark Brown
2026-11-14  1:13         ` William Zhang
2026-11-14  6:07           ` shao.mingyin
2026-11-14 14:14             ` Mark Brown
2026-11-10 15:35 ` [PATCH v2 4/5] spi: apple: fix division by zero in clock divisor calculation shao.mingyin
2026-11-10 15:35 ` [PATCH v2 5/5] spi: atmel: use the maximum divider for an unspecified speed shao.mingyin
2026-11-10 16:14 ` [PATCH v2 0/5] spi: fix division by zero with a zero transfer speed Mark Brown
2026-11-11  9:36   ` shao.mingyin
2026-11-13 22:07 ` Mark Brown [this message]
2026-11-14  0:39   ` William Zhang
2026-11-14  0:57     ` Mark Brown
2026-11-14  1:11       ` William Zhang

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=179460764342.448985.18219249061160291658.b4-ty@b4 \
    --to=broonie@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=anand.gore@broadcom.com \
    --cc=asahi@lists.linux.dev \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=florian.fainelli@broadcom.com \
    --cc=j@jannau.net \
    --cc=jonas.gorski@gmail.com \
    --cc=kursad.oney@broadcom.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=neal@gompa.dev \
    --cc=nicolas.ferre@microchip.com \
    --cc=pjw@kernel.org \
    --cc=rafal@milecki.pl \
    --cc=ryan.wanner@microchip.com \
    --cc=samuel.holland@sifive.com \
    --cc=shao.mingyin@zte.com.cn \
    --cc=sven@kernel.org \
    --cc=william.zhang@broadcom.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

all inboxes | Powered by JetHome®