[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201124133139.GB4933@sirena.org.uk>
Date: Tue, 24 Nov 2020 13:31:39 +0000
From: Mark Brown <broonie@...nel.org>
To: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
linux-spi@...r.kernel.org
Subject: Re: [PATCH v2 2/3] spi: Use bus_type functions for probe, remove and
shutdown
On Tue, Nov 24, 2020 at 02:01:07PM +0100, Uwe Kleine-König wrote:
> On Tue, Nov 24, 2020 at 01:03:25PM +0100, Marek Szyprowski wrote:
> > > + if (sdrv->shutdown)
> > > + sdrv->shutdown(to_spi_device(dev));
> > > }
> > In the above function dev->driver might be NULL, so its use in
> > to_spi_driver() and sdrv->shutdown leads to NULL pointer dereference. I
> > didn't check the details, but a simple check for NULL dev->driver and
> > return is enough to fix this issue. I can send such fix if you want.
> Ah, I see. shutdown is called for unbound devices, too. Assuming that
> Mark prefers a fix on top instead of an updated patch: Yes, please send
> a fix. Otherwise I can do this, too, as I introduced the problem.
Yes, please send an incremental fix (in general in a situation like this
I'd just send a fix as part of the original report, it's quicker if the
fix is OK).
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists