[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231002101742.0000774b@Huawei.com>
Date: Mon, 2 Oct 2023 10:17:42 +0100
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Dan Carpenter <dan.carpenter@...aro.org>
CC: David Lechner <dlechner@...libre.com>, <linux-iio@...r.kernel.org>,
<devicetree@...r.kernel.org>, <linux-staging@...ts.linux.dev>,
David Lechner <david@...hnology.com>,
Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Nuno Sá
<nuno.sa@...log.com>, Axel Haslam <ahaslam@...libre.com>,
Philip Molloy <pmolloy@...libre.com>,
<linux-kernel@...r.kernel.org>,
Vincent Whitchurch <vincent.whitchurch@...s.com>
Subject: Re: [PATCH v3 02/27] staging: iio: resolver: ad2s1210: fix use
before initialization
On Mon, 2 Oct 2023 11:07:15 +0300
Dan Carpenter <dan.carpenter@...aro.org> wrote:
> On Fri, Sep 29, 2023 at 12:23:07PM -0500, David Lechner wrote:
> > From: David Lechner <david@...hnology.com>
> >
> > From: David Lechner <dlechner@...libre.com>
> >
> > This fixes a use before initialization in ad2s1210_probe(). The
> > ad2s1210_setup_gpios() function uses st->sdev but it was being called
> > before this field was initialized.
> >
> > Signed-off-by: David Lechner <dlechner@...libre.com>
> > ---
> >
>
> Fixes: b19e9ad5e2cb ("staging:iio:resolver:ad2s1210 general driver cleanup.")
Thanks but nope, not that one.
At that point ad2s1210_setup_gpios, didn't use st->sdev.
I think this went wrong when the platform data was removed in
I 'think' it was
Fixes: f356dc6ec26b ("staging: iio: ad2s1210: Switch to the gpio descriptor interface")
>
> This would crash the driver right away, on probe. It's amazing no one
> filed a bug report even though the bug is 12 years old.
Only 5 years :)
Welcome to the long tail of IIO Devices and the long term availability of the
hardware - this is still a production part. Clearly no one was using the
upstream driver for 5 + years, but here comes David who is not only fixing
the bugs but cleaning it up.
Hmm. What happened to roadtest? I was hoping that would solve this sort
of issue by allowing simple testing of basic functionality... Hope it
is still headed for a new version / upstream!
Jonathan
> regards,
> dan carpenter
Powered by blists - more mailing lists