Re: [PATCH v2 2/3] spi: Use bus_type functions for probe, remove and shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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).

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux