* [syzbot] [bcachefs?] WARNING in bch2_dev_free (2)
@ 2025-07-17 19:13 syzbot
2025-07-17 21:21 ` Kent Overstreet
2025-07-18 19:12 ` Kent Overstreet
0 siblings, 2 replies; 3+ messages in thread
From: syzbot @ 2025-07-17 19:13 UTC (permalink / raw)
To: kent.overstreet, linux-bcachefs, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: e8352908bdcd Add linux-next specific files for 20250716
git tree: linux-next
console+strace: https://syzkaller.appspot.com/x/log.txt?x=156f67d4580000
kernel config: https://syzkaller.appspot.com/x/.config?x=2594af20939db736
dashboard link: https://syzkaller.appspot.com/bug?extid=6d52ee9afea131b36348
compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a2158c580000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=138bc58c580000
Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c5f2b597f40f/disk-e8352908.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/0d56411fc215/vmlinux-e8352908.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7f800652df04/bzImage-e8352908.xz
mounted in repro: https://storage.googleapis.com/syzbot-assets/e21d9537db5e/mount_0.gz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+6d52ee9afea131b36348@syzkaller.appspotmail.com
bcachefs (loop0): going read-write
bcachefs (loop0): bch2_write_super(): fatal error loop0: Superblock modified by another process (seq 43 expected 42)
bcachefs (loop0): error in recovery: erofs_sb_err
bcachefs (loop0): bch2_fs_start(): error starting filesystem erofs_sb_err
------------[ cut here ]------------
WARNING: fs/bcachefs/super.c:1373 at bch2_dev_free+0x3db/0x480 fs/bcachefs/super.c:1373, CPU#0: syz-executor315/5848
Modules linked in:
CPU: 0 UID: 0 PID: 5848 Comm: syz-executor315 Not tainted 6.16.0-rc6-next-20250716-syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:bch2_dev_free+0x3db/0x480 fs/bcachefs/super.c:1373
Code: f7 e8 e9 13 e2 ff 4c 89 ef e8 e1 13 e2 ff 4c 89 ff 48 83 c4 18 5b 41 5c 41 5d 41 5e 41 5f 5d e9 7b dd 14 07 e8 96 e7 65 fd 90 <0f> 0b 90 e9 2c fd ff ff e8 88 e7 65 fd 90 0f 0b 90 e9 fe fd ff ff
RSP: 0018:ffffc90003f2f8c8 EFLAGS: 00010293
RAX: ffffffff8459bf3a RBX: dffffc0000000000 RCX: ffff888033b1bc00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: 0000000000000000 R08: ffff88801fb71687 R09: 1ffff11003f6e2d0
R10: dffffc0000000000 R11: ffffed1003f6e2d1 R12: ffff888031fe8128
R13: 0000000000000001 R14: 1ffff110063fd024 R15: 1ffff110063fd025
FS: 0000555561a5c380(0000) GS:ffff888125be2000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000557f62e59da0 CR3: 0000000068888000 CR4: 00000000003526f0
Call Trace:
<TASK>
bch2_fs_free+0x440/0x550 fs/bcachefs/super.c:749
bch2_fs_get_tree+0xb76/0x1540 fs/bcachefs/fs.c:2572
vfs_get_tree+0x8f/0x2b0 fs/super.c:1804
do_new_mount+0x2a2/0x9e0 fs/namespace.c:3805
do_mount fs/namespace.c:4133 [inline]
__do_sys_mount fs/namespace.c:4344 [inline]
__se_sys_mount+0x317/0x410 fs/namespace.c:4321
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f27d9758eaa
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb a6 e8 5e 04 00 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffd6f511ee8 EFLAGS: 00000282 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 00007ffd6f511f00 RCX: 00007f27d9758eaa
RDX: 0000200000000080 RSI: 0000200000000000 RDI: 00007ffd6f511f00
RBP: 0000200000000000 R08: 00007ffd6f511f40 R09: 000000000000f631
R10: 0000000001010051 R11: 0000000000000282 R12: 0000200000000080
R13: 0000000000000004 R14: 0000000000000003 R15: 00007ffd6f511f40
</TASK>
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [bcachefs?] WARNING in bch2_dev_free (2)
2025-07-17 19:13 [syzbot] [bcachefs?] WARNING in bch2_dev_free (2) syzbot
@ 2025-07-17 21:21 ` Kent Overstreet
2025-07-18 19:12 ` Kent Overstreet
1 sibling, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2025-07-17 21:21 UTC (permalink / raw)
To: syzbot; +Cc: linux-bcachefs, linux-kernel, syzkaller-bugs
On Thu, Jul 17, 2025 at 12:13:33PM -0700, syzbot wrote:
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit: e8352908bdcd Add linux-next specific files for 20250716
> git tree: linux-next
> console+strace: https://syzkaller.appspot.com/x/log.txt?x=156f67d4580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=2594af20939db736
> dashboard link: https://syzkaller.appspot.com/bug?extid=6d52ee9afea131b36348
> compiler: Debian clang version 20.1.7 (++20250616065708+6146a88f6049-1~exp1~20250616065826.132), Debian LLD 20.1.7
> syz repro: https://syzkaller.appspot.com/x/repro.syz?x=11a2158c580000
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=138bc58c580000
regression from
bcachefs: Fix __bch2_fs_read_write() error path
fixed by
(mark dirty before we start the write refcounts)
commit 212c9b90f9915058b4d98210660daa10860b124b
Author: Kent Overstreet <kent.overstreet@linux.dev>
Date: Thu Jul 17 16:11:38 2025 -0400
fixup! bcachefs: Fix __bch2_fs_read_write() error path
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c
index 4e038f655f83..0fc0b2221036 100644
--- a/fs/bcachefs/super.c
+++ b/fs/bcachefs/super.c
@@ -514,6 +514,10 @@ static int __bch2_fs_read_write(struct bch_fs *c, bool early)
if (ret)
return ret;
+ ret = bch2_fs_mark_dirty(c);
+ if (ret)
+ return ret;
+
clear_bit(BCH_FS_clean_shutdown, &c->flags);
scoped_guard(rcu)
@@ -537,10 +541,6 @@ static int __bch2_fs_read_write(struct bch_fs *c, bool early)
bch2_journal_space_available(&c->journal);
}
- ret = bch2_fs_mark_dirty(c);
- if (ret)
- return ret;
-
/*
* Don't jump to our error path, and call bch2_fs_read_only(), unless we
* successfully marked the filesystem dirty
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [syzbot] [bcachefs?] WARNING in bch2_dev_free (2)
2025-07-17 19:13 [syzbot] [bcachefs?] WARNING in bch2_dev_free (2) syzbot
2025-07-17 21:21 ` Kent Overstreet
@ 2025-07-18 19:12 ` Kent Overstreet
1 sibling, 0 replies; 3+ messages in thread
From: Kent Overstreet @ 2025-07-18 19:12 UTC (permalink / raw)
To: syzbot; +Cc: linux-bcachefs, linux-kernel, syzkaller-bugs
Fixed version is now in linux-next...
#syz fix: bcachefs: Fix __bch2_fs_read_write() error path
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-18 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 19:13 [syzbot] [bcachefs?] WARNING in bch2_dev_free (2) syzbot
2025-07-17 21:21 ` Kent Overstreet
2025-07-18 19:12 ` Kent Overstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).