From: Andreas Gruenbacher <agruenba@redhat.com>
To: Nirbhay Sharma <nirbhay.lkd@gmail.com>
Cc: Andreas Gruenbacher <agruenba@redhat.com>,
gfs2@lists.linux.dev, linux-kernel@vger.kernel.org,
syzbot+19e0be39cc25dfcb0858@syzkaller.appspotmail.com,
skhan@linuxfoundation.org, david.hunter.linux@gmail.com,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] gfs2: flush withdraw work before freeing gfs2_sbd
Date: Sun, 16 Nov 2025 20:12:23 +0000 [thread overview]
Message-ID: <20251116201224.2151726-1-agruenba@redhat.com> (raw)
In-Reply-To: <8f270474-7ced-4668-97da-f3d7709a82e7@gmail.com>
Hi Nirbhay,
On Thu, Nov 13, 2025 at 9:24 PM Nirbhay Sharma <nirbhay.lkd@gmail.com> wrote:
> Hi Andreas,
>
> I hope this email finds you well.
>
> I'm writing to follow up on the GFS2 patch I submitted regarding the ODEBUG warning in free_sbd(). The patch addressed the syzbot report where sd_withdraw_work was being freed while still active.
>
> I wanted to check if you've had a chance to review the patch, or if there's any feedback or additional information I can provide to help with the review process.
>
> I understand maintainers are busy, and I'm happy to make any necessary revisions or provide further clarification on the testing that was performed.
thanks for looking into this issue, but this is already fixed in the
updated version of patch "gfs2: Asynchronous withdraw" which has been on
gfs2 for-next since at least October 23. Below is my isolated fix.
Thanks,
Andreas
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 2d177aa21ffd..c42982bdd4b2 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1294,7 +1294,6 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
fail_per_node:
init_per_node(sdp, UNDO);
fail_inodes:
- flush_work(&sdp->sd_withdraw_work);
init_inodes(sdp, UNDO);
fail_sb:
if (sdp->sd_root_dir)
diff --git a/fs/gfs2/util.c b/fs/gfs2/util.c
index fff0b0e2e27c..c454bea101de 100644
--- a/fs/gfs2/util.c
+++ b/fs/gfs2/util.c
@@ -345,6 +345,12 @@ void gfs2_withdraw(struct gfs2_sbd *sdp)
} while (unlikely(!try_cmpxchg(&sdp->sd_flags, &old, new)));
dump_stack();
+ /*
+ * There is no need to withdraw when the superblock hasn't been
+ * fully initialized, yet.
+ */
+ if (!(sdp->sd_vfs->s_flags & SB_BORN))
+ return;
fs_err(sdp, "about to withdraw this file system\n");
schedule_work(&sdp->sd_withdraw_work);
}
prev parent reply other threads:[~2025-11-16 20:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <68f6a48f.050a0220.91a22.0451.GAE@google.com>
2025-10-24 14:43 ` [PATCH] gfs2: flush withdraw work before freeing gfs2_sbd Nirbhay Sharma
[not found] ` <8f270474-7ced-4668-97da-f3d7709a82e7@gmail.com>
2025-11-15 16:12 ` David Hunter
2025-11-16 20:12 ` Andreas Gruenbacher [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=20251116201224.2151726-1-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=david.hunter.linux@gmail.com \
--cc=gfs2@lists.linux.dev \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nirbhay.lkd@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=syzbot+19e0be39cc25dfcb0858@syzkaller.appspotmail.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