[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20191001114108.GA4786@sirena.co.uk>
Date: Tue, 1 Oct 2019 12:41:08 +0100
From: Mark Brown <broonie@...nel.org>
To: Geert Uytterhoeven <geert@...ux-m68k.org>
Cc: Lukasz Majewski <lukma@...x.de>,
Colin Ian King <colin.king@...onical.com>,
linux-spi <linux-spi@...r.kernel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
kbuild test robot <lkp@...el.com>,
Julia Lawall <julia.lawall@...6.fr>,
Dan Carpenter <dan.carpenter@...cle.com>
Subject: Re: [PATCH] spi: Avoid calling spi_slave_abort() with kfreed spidev
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@...x.de> wrote:
> > > On Tue, Oct 1, 2019 at 11:07 AM Lukasz Majewski <lukma@...x.de> 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.
Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)
Powered by blists - more mailing lists