Re: [syzbot] Re: [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail

From: syzbot
Date: Tue Jan 14 2025 - 20:13:20 EST


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

***

Subject: Re: [syzbot] [ext4?] [ocfs2?] WARNING in jbd2_journal_update_sb_log_tail
Author: heming.zhao@xxxxxxxx

On 9/30/24 01:12, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: 684a64bf32b6 Merge tag 'nfs-for-6.12-1' of git://git.linux..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=138c0907980000
> kernel config: https://syzkaller.appspot.com/x/.config?x=bd75e1a00004094f
> dashboard link: https://syzkaller.appspot.com/bug?extid=96ee12698391289383dd
> compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=13bea99f980000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=17d04aa9980000
>
> Downloadable assets:
> disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7bc7510fe41f/non_bootable_disk-684a64bf.raw.xz
> vmlinux: https://storage.googleapis.com/syzbot-assets/f05b4b08a420/vmlinux-684a64bf.xz
> kernel image: https://storage.googleapis.com/syzbot-assets/d59f9edaf3bc/bzImage-684a64bf.xz
> mounted in repro: https://storage.googleapis.com/syzbot-assets/a82758cb7d80/mount_0.gz
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+96ee12698391289383dd@xxxxxxxxxxxxxxxxxxxxxxxxx
>
> (syz-executor214,5103,0):ocfs2_block_check_validate:402 ERROR: CRC32 failed: stored: 0xb3775c19, computed 0x2dd1c265. Applying ECC.
> JBD2: Ignoring recovery information on journal
> ------------[ cut here ]------------
> WARNING: CPU: 0 PID: 5103 at fs/jbd2/journal.c:1887 jbd2_journal_update_sb_log_tail+0x2ba/0x360 fs/jbd2/journal.c:1887

#syz test

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index c79b4291777f..0d9a7bb5bc88 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2410,7 +2410,7 @@ static int ocfs2_check_volume(struct ocfs2_super *osb)
* recover anything. Otherwise, journal_load will do that
* dirty work for us :) */
if (!dirty) {
- status = ocfs2_journal_wipe(osb->journal, 0);
+ status = ocfs2_journal_wipe(osb->journal, 1);
if (status < 0) {
mlog_errno(status);
goto finally;