Re: [syzbot] [gfs2?] kernel BUG in gfs2_quota_cleanup

From: syzbot
Date: Fri Dec 01 2023 - 23:18:30 EST


For archival purposes, forwarding an incoming command email to
linux-kernel@xxxxxxxxxxxxxxx.

***

Subject: [gfs2?] kernel BUG in gfs2_quota_cleanup
Author: eadavis@xxxxxx

please test kernel BUG in gfs2_quota_cleanup

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 994d5c58e50e

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 95dae7838b4e..af32dd8a72fa 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1505,7 +1505,8 @@ void gfs2_quota_cleanup(struct gfs2_sbd *sdp)
LIST_HEAD(dispose);
int count;

- BUG_ON(test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags));
+ BUG_ON(!test_bit(SDF_NORECOVERY, &sdp->sd_flags) &&
+ test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags));

spin_lock(&qd_lock);
list_for_each_entry(qd, &sdp->sd_quota_list, qd_list) {