mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/7] iio: validate SPI match data before use
@ 2026-09-25 13:17 Jiale Yao
  2026-09-25 13:17 ` [PATCH 1/7] iio: amplifiers: ad8366: reject devices without match data Jiale Yao
                   ` (7 more replies)
  0 siblings, 8 replies; 10+ messages in thread
From: Jiale Yao @ 2026-09-25 13:17 UTC (permalink / raw)
  To: Nuno Sá,
	Michael Hennerich, Rodrigo Alencar, Jonathan Cameron,
	David Lechner, Andy Shevchenko, Anshul Dalal, Antoniu Miclaus,
	Herve Codina, Uwe Kleine-König (The Capable Hub),
	Shi Hao, Linus Walleij, Krzysztof Kozlowski, Angel Iglesias,
	linux, linux-iio, linux-kernel
  Cc: Jiale Yao

SPI driver_override can bind a device without a matching entry in the
driver's ID tables.  spi_get_device_match_data() then returns NULL.

These seven IIO drivers use that result without checking it, causing a
NULL pointer dereference during probe.  Add the missing checks before
the match data is used.

Jiale Yao (7):
  iio: amplifiers: ad8366: reject devices without match data
  iio: dac: ad5755: validate SPI match data
  iio: dac: mcp4821: reject devices without match data
  iio: frequency: adf4377: reject devices without match data
  iio: imu: adis16400: validate SPI match data
  iio: potentiometer: x9250: reject devices without match data
  iio: pressure: bmp280: validate SPI match data

 drivers/iio/amplifiers/ad8366.c   | 2 ++
 drivers/iio/dac/ad5755.c          | 3 +++
 drivers/iio/dac/mcp4821.c         | 7 +++++--
 drivers/iio/frequency/adf4377.c   | 3 +++
 drivers/iio/imu/adis16400.c       | 3 +++
 drivers/iio/potentiometer/x9250.c | 7 ++++++-
 drivers/iio/pressure/bmp280-spi.c | 2 ++
 7 files changed, 24 insertions(+), 3 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-09-26  6:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 13:17 [PATCH 0/7] iio: validate SPI match data before use Jiale Yao
2026-09-25 13:17 ` [PATCH 1/7] iio: amplifiers: ad8366: reject devices without match data Jiale Yao
2026-09-25 13:17 ` [PATCH 2/7] iio: dac: ad5755: validate SPI " Jiale Yao
2026-09-25 13:17 ` [PATCH 3/7] iio: dac: mcp4821: reject devices without " Jiale Yao
2026-09-25 13:17 ` [PATCH 4/7] iio: frequency: adf4377: " Jiale Yao
2026-09-25 13:17 ` [PATCH 5/7] iio: imu: adis16400: validate SPI " Jiale Yao
2026-09-25 13:17 ` [PATCH 6/7] iio: potentiometer: x9250: reject devices without " Jiale Yao
2026-09-25 13:17 ` [PATCH 7/7] iio: pressure: bmp280: validate SPI " Jiale Yao
2026-09-26  1:11 ` [PATCH 0/7] iio: validate SPI match data before use Jonathan Cameron
2026-09-26  6:13   ` Uwe Kleine-König (The Capable Hub)

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®