From: Christoph Hellwig <hch@lst.de>
To: Gulam Mohamed <gulam.mohamed@oracle.com>
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
yukuai1@huaweicloud.com, hch@lst.de, axboe@kernel.dk
Subject: Re: [PATCH V4 for-6.10/block] loop: Fix a race between loop detach and loop open
Date: Wed, 12 Jun 2024 07:19:40 +0200 [thread overview]
Message-ID: <20240612051940.GA27294@lst.de> (raw)
In-Reply-To: <20240607190607.17705-1-gulam.mohamed@oracle.com>
On Fri, Jun 07, 2024 at 07:06:07PM +0000, Gulam Mohamed wrote:
> Setting the lo_state to Lo_rundown in loop_clr_fd() may not help in
> stopping the incoming open(), when the loop is being detached, as the
> open() could invoke the lo_open() before the lo_state is set to Lo_rundown
> and increment the disk_openers refcnt later.
> As the actual cleanup is deferred to last close, in release, there is no
> chance for the open() to kick in to take the reference. Because both open()
> and release() are protected by open_mutex and hence they cannot run in
> parallel.
> So, lo_open() and setting lo_state to Lo_rundown is not needed. Removing
> the loop state Lo_rundown as its not used anymore.
Looks like LTP still expects Lo_rundown to be set.
next prev parent reply other threads:[~2024-06-12 5:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 19:06 [PATCH V4 for-6.10/block] loop: Fix a race between loop detach and loop open Gulam Mohamed
2024-06-08 5:20 ` Christoph Hellwig
2024-06-10 3:44 ` Chaitanya Kulkarni
2024-06-11 14:58 ` kernel test robot
2024-06-13 21:10 ` Gulam Mohamed
2024-06-14 5:45 ` hch
2024-06-14 23:35 ` Gulam Mohamed
2024-06-12 5:19 ` Christoph Hellwig [this message]
2025-03-31 14:10 ` Zhu Yanjun
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=20240612051940.GA27294@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=gulam.mohamed@oracle.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yukuai1@huaweicloud.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).