From: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
To: "viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>
Cc: "frank.li@vivo.com" <frank.li@vivo.com>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"slava@dubeyko.com" <slava@dubeyko.com>,
"syzbot+8c0bc9f818702ff75b76@syzkaller.appspotmail.com"
<syzbot+8c0bc9f818702ff75b76@syzkaller.appspotmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ernesto.mnd.fernandez@gmail.com"
<ernesto.mnd.fernandez@gmail.com>,
"glaubitz@physik.fu-berlin.de" <glaubitz@physik.fu-berlin.de>
Subject: RE: [PATCH v2] hfsplus: remove mutex_lock check in hfsplus_free_extents
Date: Thu, 29 May 2025 18:48:39 +0000 [thread overview]
Message-ID: <ce76e5f39c3c79add342e7302a2945e5c331cb42.camel@ibm.com> (raw)
In-Reply-To: <20250529183643.GM2023217@ZenIV>
On Thu, 2025-05-29 at 19:36 +0100, Al Viro wrote:
> On Thu, May 29, 2025 at 06:34:43PM +0000, Viacheslav Dubeyko wrote:
> > > diff --git a/fs/hfsplus/extents.c b/fs/hfsplus/extents.c
> > > index a6d61685ae79..b1699b3c246a 100644
> > > --- a/fs/hfsplus/extents.c
> > > +++ b/fs/hfsplus/extents.c
> > > @@ -342,9 +342,6 @@ static int hfsplus_free_extents(struct super_block *sb,
> > > int i;
> > > int err = 0;
> > >
> > > - /* Mapping the allocation file may lock the extent tree */
> > > - WARN_ON(mutex_is_locked(&HFSPLUS_SB(sb)->ext_tree->tree_lock));
> > > -
> >
> > Makes sense to me. Looks good.
> >
> > But I really like your mentioning of reproducing the issue in generic/013 and
> > really nice analysis of the issue there. Sadly, we haven't it in the comment. :)
>
> Umm... *Is* that thing safe to call without that lock?
As far as I can see, hfsplus_free_fork() works under ext_tree->tree_lock mutex
lock.
And hfsplus_free_extents() calls hfsplus_block_free(). This guy
uses sbi->alloc_mutex to protect free blocks operation. So, operation
should be mostly safe.
Thanks,
Slava.
next prev parent reply other threads:[~2025-05-29 18:48 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-29 6:18 Yangtao Li
2025-05-29 10:34 ` wangjianjian (C)
2025-05-29 10:46 ` Yangtao Li
2025-05-30 1:20 ` wangjianjian (C)
2025-05-29 18:34 ` Viacheslav Dubeyko
2025-05-29 18:36 ` Al Viro
2025-05-29 18:48 ` Viacheslav Dubeyko [this message]
2025-05-30 2:47 ` Yangtao Li
2025-05-30 2:41 ` Yangtao Li
2025-06-06 23:04 ` Viacheslav Dubeyko
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=ce76e5f39c3c79add342e7302a2945e5c331cb42.camel@ibm.com \
--to=slava.dubeyko@ibm.com \
--cc=akpm@linux-foundation.org \
--cc=ernesto.mnd.fernandez@gmail.com \
--cc=frank.li@vivo.com \
--cc=glaubitz@physik.fu-berlin.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=slava@dubeyko.com \
--cc=syzbot+8c0bc9f818702ff75b76@syzkaller.appspotmail.com \
--cc=viro@zeniv.linux.org.uk \
/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
all inboxes | Powered by JetHome®