From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Cameron <jic23@kernel.org>
Cc: "Uwe Kleine-König (The Capable Hub)"
<u.kleine-koenig@baylibre.com>, "Jiale Yao" <yaojiale02@163.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Rodrigo Alencar" <rodrigo.alencar@analog.com>,
"David Lechner" <dlechner@baylibre.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Anshul Dalal" <anshulusr@gmail.com>,
"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
"Herve Codina" <herve.codina@bootlin.com>,
"Shi Hao" <i.shihao.999@gmail.com>,
"Linus Walleij" <linusw@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Angel Iglesias" <ang.iglesiasg@gmail.com>,
linux@analog.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 0/7] iio: validate SPI match data before use
Date: Mon, 28 Sep 2026 11:14:15 +0300 [thread overview]
Message-ID: <aroh125qBr1ZAXBI@ashevche-desk.local> (raw)
In-Reply-To: <20260927182001.10c331dd@jic23-hlaptop>
On Sun, Sep 27, 2026 at 06:20:01PM +0100, Jonathan Cameron wrote:
> On Sat, 26 Sep 2026 08:13:13 +0200
> Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> wrote:
> > On Sat, Sep 26, 2026 at 02:11:43AM +0100, Jonathan Cameron wrote:
> > > On Fri, 25 Sep 2026 21:17:29 +0800
> > > Jiale Yao <yaojiale02@163.com> wrote:
> > >
> > > > 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.
> > >
> > > I was hoping we'd close this finally by adding a flag to the
> > > drivers to say they should fail a match if driver_override is set.
> > > Given I thought maybe that would happen when Andy looked into this
> > > a while back I've been sitting on this problem for a while.
Sorry, I have had no time to continue...
> > >
> > > Unfortunately seems we have to carry on papering over it in the
> > > drivers for now :(
> >
> > Note there is another effort:
> > https://lore.kernel.org/lkml/20260922-driver-override-opt-out-v1-0-58c35ded3b83@nvidia.com/
...but I like this effort, it looks great!
> Nice. I look forward to ripping all these checks out again
> if that lands. Obviously we won't backport doing that given the checks
> will remain harmless.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2026-09-28 8:14 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
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
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)
2026-09-27 17:20 ` Jonathan Cameron
2026-09-28 8:14 ` Andy Shevchenko [this message]
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=aroh125qBr1ZAXBI@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=ang.iglesiasg@gmail.com \
--cc=anshulusr@gmail.com \
--cc=antoniu.miclaus@analog.com \
--cc=dlechner@baylibre.com \
--cc=herve.codina@bootlin.com \
--cc=i.shihao.999@gmail.com \
--cc=jic23@kernel.org \
--cc=krzk@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@analog.com \
--cc=nuno.sa@analog.com \
--cc=rodrigo.alencar@analog.com \
--cc=u.kleine-koenig@baylibre.com \
--cc=yaojiale02@163.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®