From: Lukas Wunner <lukas@wunner.de>
To: yangerkun <yangerkun@huawei.com>,
sashal@kernel.org, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org, chenwenyong2@huawei.com,
stable@vger.kernel.org, "zhangyi (F)" <yi.zhang@huawei.com>
Subject: Re: Patch "spi: Fix controller unregister order" has been added to the 4.4-stable tree
Date: Sat, 5 Dec 2020 18:42:07 +0100 [thread overview]
Message-ID: <20201205174207.GA4028@wunner.de> (raw)
In-Reply-To: <8c7683cc-ca73-6883-8e45-613de68fa665@huawei.com>
On Sat, Oct 10, 2020 at 04:41:09PM +0800, yangerkun wrote:
> ?? 2020/6/16 9:56, Sasha Levin ????:
> > This is a note to let you know that I've just added the patch titled
> >
> > spi: Fix controller unregister order
> >
> > to the 4.4-stable tree which can be found at:
[...]
> > --- a/drivers/spi/spi.c
> > +++ b/drivers/spi/spi.c
> > @@ -1922,11 +1922,12 @@ void spi_unregister_master(struct spi_master *master)
> > dev_err(&master->dev, "queue remove failed\n");
> > }
> > + device_for_each_child(&master->dev, NULL, __unregister);
> > +
>
> This is a wrong patch. We should move this line before
> spi_destroy_queue, but we didn't. 4.9 stable exists this
> problem too.
Hi Sasha, Hi Greg,
below please find a patch for the 4.9-stable tree to fix the backporting
issue reported above.
Thanks!
-- >8 --
Subject: [PATCH] spi: Fix controller unregister order harder
Commit c7e41e1caa71 sought to backport upstream commit 84855678add8 to
the 4.9-stable tree but erroneously inserted a line at the wrong place.
Fix it.
Fixes: c7e41e1caa71 ("spi: Fix controller unregister order")
Reported-by: yangerkun <yangerkun@huawei.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
---
drivers/spi/spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c7c9ca3178ad..e0632ee1723b 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -2070,13 +2070,13 @@ static int __unregister(struct device *dev, void *null)
*/
void spi_unregister_master(struct spi_master *master)
{
+ device_for_each_child(&master->dev, NULL, __unregister);
+
if (master->queued) {
if (spi_destroy_queue(master))
dev_err(&master->dev, "queue remove failed\n");
}
- device_for_each_child(&master->dev, NULL, __unregister);
-
mutex_lock(&board_lock);
list_del(&master->list);
mutex_unlock(&board_lock);
--
2.29.2
next parent reply other threads:[~2020-12-05 18:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200616015646.AC54E2074D@mail.kernel.org>
[not found] ` <8c7683cc-ca73-6883-8e45-613de68fa665@huawei.com>
2020-12-05 17:42 ` Lukas Wunner [this message]
2020-12-06 9:47 ` Patch "spi: Fix controller unregister order" has been added to the 4.4-stable tree Greg KH
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=20201205174207.GA4028@wunner.de \
--to=lukas@wunner.de \
--cc=chenwenyong2@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=yangerkun@huawei.com \
--cc=yi.zhang@huawei.com \
/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;
as well as URLs for NNTP newsgroup(s).