From: syzbot <syzbot+c27dee924f3271489c82@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org
Subject: Forwarded: Re: [syzbot] [xfs?] INFO: task hung in xlog_force_lsn (2)
Date: Sun, 12 Apr 2026 23:19:57 -0700 [thread overview]
Message-ID: <69dc8b0d.a00a0220.475f0.0020.GAE@google.com> (raw)
In-Reply-To: <68e9715b.050a0220.1186a4.000e.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org.
***
Subject: Re: [syzbot] [xfs?] INFO: task hung in xlog_force_lsn (2)
Author: ytohnuki@amazon.com
#syz test
diff --git a/fs/xfs/xfs_log.c b/fs/xfs/xfs_log.c
index f807f8f4f705..2645052042bf 100644
--- a/fs/xfs/xfs_log.c
+++ b/fs/xfs/xfs_log.c
@@ -426,6 +426,23 @@ xlog_state_shutdown_callbacks(
struct xlog_in_core *iclog;
LIST_HEAD(cb_list);
+ /*
+ * Shutdown waiters on ic_force_wait do not require callback completion.
+ * Once log shutdown has been established, they only need to wake,
+ * observe xlog_is_shutdown(), and abort with -EIO.
+ *
+ * Wake them before processing callbacks to avoid deadlock if callback
+ * processing blocks on a buffer lock and prevents the wakeup from being
+ * reached.
+ *
+ * Keep ic_write_wait wakeups ordered after callback processing so
+ * shutdown callback side effects still complete before teardown progresses.
+ */
+ iclog = log->l_iclog;
+ do {
+ wake_up_all(&iclog->ic_force_wait);
+ } while ((iclog = iclog->ic_next) != log->l_iclog);
+
iclog = log->l_iclog;
do {
if (atomic_read(&iclog->ic_refcnt)) {
@@ -439,7 +456,6 @@ xlog_state_shutdown_callbacks(
spin_lock(&log->l_icloglock);
wake_up_all(&iclog->ic_write_wait);
- wake_up_all(&iclog->ic_force_wait);
} while ((iclog = iclog->ic_next) != log->l_iclog);
wake_up_all(&log->l_flush_wait);
--
2.50.1
Amazon Web Services EMEA SARL, 38 avenue John F. Kennedy, L-1855 Luxembourg, R.C.S. Luxembourg B186284
Amazon Web Services EMEA SARL, Irish Branch, One Burlington Plaza, Burlington Road, Dublin 4, Ireland, branch registration number 908705
next prev parent reply other threads:[~2026-04-13 6:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-10 20:49 [syzbot] [xfs?] INFO: task hung in xlog_force_lsn (2) syzbot
2026-04-13 6:19 ` syzbot [this message]
2026-04-13 8:06 ` Forwarded: " syzbot
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=69dc8b0d.a00a0220.475f0.0020.GAE@google.com \
--to=syzbot+c27dee924f3271489c82@syzkaller.appspotmail.com \
--cc=linux-kernel@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