From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Hou Tao <houtao@huaweicloud.com>
Cc: stable@vger.kernel.org, linux-raid@vger.kernel.org,
David Sloan <david.sloan@eideticom.com>,
Logan Gunthorpe <logang@deltatee.com>, Song Liu <song@kernel.org>,
Jens Axboe <axboe@kernel.dk>, Sasha Levin <sashal@kernel.org>,
houtao1@huawei.com
Subject: Re: [PATCH 5.10] md: Flush workqueue md_rdev_misc_wq in md_alloc()
Date: Tue, 28 Feb 2023 19:37:08 +0100 [thread overview]
Message-ID: <Y/5J1KXCvSPuJs4C@kroah.com> (raw)
In-Reply-To: <20230224065209.3170104-1-houtao@huaweicloud.com>
On Fri, Feb 24, 2023 at 02:52:09PM +0800, Hou Tao wrote:
> From: David Sloan <david.sloan@eideticom.com>
>
> commit 5e8daf906f890560df430d30617c692a794acb73 upstream.
>
> A race condition still exists when removing and re-creating md devices
> in test cases. However, it is only seen on some setups.
>
> The race condition was tracked down to a reference still being held
> to the kobject by the rdev in the md_rdev_misc_wq which will be released
> in rdev_delayed_delete().
>
> md_alloc() waits for previous deletions by waiting on the md_misc_wq,
> but the md_rdev_misc_wq may still be holding a reference to a recently
> removed device.
>
> To fix this, also flush the md_rdev_misc_wq in md_alloc().
>
> Signed-off-by: David Sloan <david.sloan@eideticom.com>
> [logang@deltatee.com: rewrote commit message]
> Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
> Signed-off-by: Song Liu <song@kernel.org>
> Signed-off-by: Hou Tao <houtao1@huawei.com>
> ---
> Hi Greg,
>
> We found the problem also exists on v5.10, so could you please pick it up
> for v5.10 ?
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-02-28 18:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-24 6:52 [PATCH 5.10] md: Flush workqueue md_rdev_misc_wq in md_alloc() Hou Tao
2023-02-24 6:42 ` Timestamps from the future (was: [PATCH 5.10] md: Flush workqueue md_rdev_misc_wq in md_alloc()) Paul Menzel
2023-02-24 6:55 ` Hou Tao
2023-02-28 18:37 ` Greg Kroah-Hartman [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=Y/5J1KXCvSPuJs4C@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=axboe@kernel.dk \
--cc=david.sloan@eideticom.com \
--cc=houtao1@huawei.com \
--cc=houtao@huaweicloud.com \
--cc=linux-raid@vger.kernel.org \
--cc=logang@deltatee.com \
--cc=sashal@kernel.org \
--cc=song@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).