From: Sasha Levin <sashal@kernel.org>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
Mark Brown <broonie@kernel.org>,
linux-spi@vger.kernel.org
Subject: Re: [PATCH AUTOSEL 5.8 28/29] spi: fsl-dspi: fix use-after-free in remove path
Date: Sun, 4 Oct 2020 08:58:04 -0400 [thread overview]
Message-ID: <20201004125804.GL2415204@sasha-vm> (raw)
In-Reply-To: <20200929062216.GL11648@pengutronix.de>
On Tue, Sep 29, 2020 at 08:22:16AM +0200, Sascha Hauer wrote:
>Hi Sasha,
>
>On Mon, Sep 28, 2020 at 09:30:25PM -0400, Sasha Levin wrote:
>> From: Sascha Hauer <s.hauer@pengutronix.de>
>>
>> [ Upstream commit 530b5affc675ade5db4a03f04ed7cd66806c8a1a ]
>>
>> spi_unregister_controller() not only unregisters the controller, but
>> also frees the controller. This will free the driver data with it, so
>> we must not access it later dspi_remove().
>>
>> Solve this by allocating the driver data separately from the SPI
>> controller.
>>
>> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
>> Link: https://lore.kernel.org/r/20200923131026.20707-1-s.hauer@pengutronix.de
>> Signed-off-by: Mark Brown <broonie@kernel.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>> ---
>> drivers/spi/spi-fsl-dspi.c | 12 +++++++-----
>> 1 file changed, 7 insertions(+), 5 deletions(-)
>
>This patch causes a regression and shouldn't be applied without the fix
>in https://lkml.org/lkml/2020/9/28/300.
Looks like the fix didn't make it yet, so I'll drop the patch.
--
Thanks,
Sasha
prev parent reply other threads:[~2020-10-04 12:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200929013027.2406344-1-sashal@kernel.org>
2020-09-29 1:30 ` [PATCH AUTOSEL 5.8 24/29] spi: fsl-espi: Only process interrupts for expected events Sasha Levin
2020-09-29 1:30 ` [PATCH AUTOSEL 5.8 28/29] spi: fsl-dspi: fix use-after-free in remove path Sasha Levin
2020-09-29 6:22 ` Sascha Hauer
2020-10-04 12:58 ` Sasha Levin [this message]
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=20201004125804.GL2415204@sasha-vm \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=stable@vger.kernel.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox