LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
peterhuewe@gmx.de, p.rosenberger@kunbus.com,
linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] tpm: fix potential NULL pointer access in tpm_del_char_device()
Date: Fri, 24 Sep 2021 11:20:32 -0300 [thread overview]
Message-ID: <20210924142032.GY3544071@ziepe.ca> (raw)
In-Reply-To: <b49f4b52-44c4-8cb8-a102-689e9f788177@gmx.de>
On Fri, Sep 24, 2021 at 04:17:52PM +0200, Lino Sanfilippo wrote:
> On 24.09.21 at 15:33, Jason Gunthorpe wrote:
> > On Fri, Sep 24, 2021 at 03:29:46PM +0200, Lino Sanfilippo wrote:
> >
> >> So this bug is triggered when the bcm2835 drivers shutdown() function is called since this
> >> driver does something quite unusual: it unregisters the spi controller in its shutdown()
> >> handler.
> >
> > This seems wrong
> >
> > Jason
> >
>
>
> Unregistering the SPI controller during shutdown is only a side-effect of calling
> bcm2835_spi_remove() in the shutdown handler:
>
> static void bcm2835_spi_shutdown(struct platform_device *pdev)
> {
> int ret;
>
> ret = bcm2835_spi_remove(pdev);
> if (ret)
> dev_err(&pdev->dev, "failed to shutdown\n");
> }
That's wrong, the shutdown handler is only supposed to make the HW
stop doing DMA and interrupts so we can have a clean transition to
kexec/etc
It should not be manipulating other state.
Jason
next prev parent reply other threads:[~2021-09-24 14:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 18:04 Lino Sanfilippo
2021-09-13 20:25 ` Jarkko Sakkinen
2021-09-13 20:53 ` Aw: " Lino Sanfilippo
2021-09-14 0:31 ` Jarkko Sakkinen
2021-09-24 13:29 ` Lino Sanfilippo
2021-09-24 13:33 ` Jason Gunthorpe
2021-09-24 14:17 ` Lino Sanfilippo
2021-09-24 14:20 ` Jason Gunthorpe [this message]
2021-09-29 8:58 ` Lino Sanfilippo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210924142032.GY3544071@ziepe.ca \
--to=jgg@ziepe.ca \
--cc=LinoSanfilippo@gmx.de \
--cc=jarkko@kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=p.rosenberger@kunbus.com \
--cc=peterhuewe@gmx.de \
--cc=stable@vger.kernel.org \
--subject='Re: [PATCH] tpm: fix potential NULL pointer access in tpm_del_char_device()' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).