Re: [PATCH] spi: Avoid calling spi_slave_abort() with kfreed spidev

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

 



On Tue, Oct 01, 2019 at 12:00:07PM +0200, Geert Uytterhoeven wrote:
> On Tue, Oct 1, 2019 at 11:34 AM Lukasz Majewski <lukma@xxxxxxx> wrote:
> > > On Tue, Oct 1, 2019 at 11:07 AM Lukasz Majewski <lukma@xxxxxxx> wrote:

> > The if (!dofree) prevents from calling spi_slave_abort() when
> > spidev->spi == NULL and spidev is kfree'd.

> If spidev->users != 0, the block checking spidev->spi == NULL is never
> executed, and spi_slave_abort() will be called.

> I'm wondering if spidev->spi can be NULL if spidev->users is still positive.

It *shouldn't* be.  I think we have other problems if it is.

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