public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [syzbot] [ocfs2?] kernel BUG in ocfs2_reserve_suballoc_bits
@ 2024-11-01 20:51 syzbot
  2024-11-06 23:12 ` syzbot
  0 siblings, 1 reply; 4+ messages in thread
From: syzbot @ 2024-11-01 20:51 UTC (permalink / raw)
  To: jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel, syzkaller-bugs

Hello,

syzbot found the following issue on:

HEAD commit:    819837584309 Linux 6.12-rc5
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=1787fe5f980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=4aec7739e14231a7
dashboard link: https://syzkaller.appspot.com/bug?extid=fd05de09d1267725aa95
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-81983758.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/c67be4ca64cb/vmlinux-81983758.xz
kernel image: https://storage.googleapis.com/syzbot-assets/d6ab06862875/bzImage-81983758.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fd05de09d1267725aa95@syzkaller.appspotmail.com

loop0: detected capacity change from 32768 to 32767
OCFS2: ERROR (device loop0): int ocfs2_validate_inode_block(struct super_block *, struct buffer_head *): Invalid dinode #65: signature = NODE01
On-disk corruption discovered. Please run fsck.ocfs2 once the filesystem is unmounted.
OCFS2: File system is now read-only.
(syz.0.0,5334,0):ocfs2_find_entry_id:407 ERROR: status = -30
------------[ cut here ]------------
kernel BUG at fs/ocfs2/suballoc.c:804!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5334 Comm: syz.0.0 Not tainted 6.12.0-rc5-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:ocfs2_reserve_suballoc_bits+0x479b/0x4eb0 fs/ocfs2/suballoc.c:804
Code: e1 07 80 c1 03 38 c1 0f 8c 75 dd ff ff 48 8d bc 24 b0 01 00 00 e8 95 c8 68 fe e9 63 dd ff ff e8 2b 19 31 08 e8 06 0b ff fd 90 <0f> 0b e8 fe 0a ff fd 48 c7 c7 00 a8 e3 8e 48 8b 74 24 28 48 89 da
RSP: 0018:ffffc9000d4cec80 EFLAGS: 00010283
RAX: ffffffff8395cd8a RBX: 0000000000000001 RCX: 0000000000040000
RDX: ffffc9000ddd1000 RSI: 000000000000211e RDI: 000000000000211f
RBP: ffffc9000d4cf170 R08: ffffffff83958865 R09: 1ffffffff203a065
R10: dffffc0000000000 R11: fffffbfff203a066 R12: 1ffff92001a99e10
R13: ffff888012259c00 R14: ffff88801fd83e00 R15: dffffc0000000000
FS:  00007fef2b9c46c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fef1ffff000 CR3: 000000001cdca000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ocfs2_reserve_cluster_bitmap_bits fs/ocfs2/suballoc.c:1132 [inline]
 ocfs2_reserve_clusters_with_limit+0x3dd/0xb60 fs/ocfs2/suballoc.c:1177
 ocfs2_mknod+0x1486/0x2b40 fs/ocfs2/namei.c:352
 ocfs2_create+0x1ab/0x480 fs/ocfs2/namei.c:672
 lookup_open fs/namei.c:3595 [inline]
 open_last_lookups fs/namei.c:3694 [inline]
 path_openat+0x1c03/0x3590 fs/namei.c:3930
 do_filp_open+0x235/0x490 fs/namei.c:3960
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1415
 do_sys_open fs/open.c:1430 [inline]
 __do_sys_open fs/open.c:1438 [inline]
 __se_sys_open fs/open.c:1434 [inline]
 __x64_sys_open+0x225/0x270 fs/open.c:1434
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fef2ab7e719
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fef2b9c4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007fef2ad36058 RCX: 00007fef2ab7e719
RDX: 0000000000000004 RSI: 0000000000060142 RDI: 0000000020000140
RBP: 00007fef2abf132e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007fef2ad36058 R15: 00007ffcfafd11e8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_reserve_suballoc_bits+0x479b/0x4eb0 fs/ocfs2/suballoc.c:804
Code: e1 07 80 c1 03 38 c1 0f 8c 75 dd ff ff 48 8d bc 24 b0 01 00 00 e8 95 c8 68 fe e9 63 dd ff ff e8 2b 19 31 08 e8 06 0b ff fd 90 <0f> 0b e8 fe 0a ff fd 48 c7 c7 00 a8 e3 8e 48 8b 74 24 28 48 89 da
RSP: 0018:ffffc9000d4cec80 EFLAGS: 00010283
RAX: ffffffff8395cd8a RBX: 0000000000000001 RCX: 0000000000040000
RDX: ffffc9000ddd1000 RSI: 000000000000211e RDI: 000000000000211f
RBP: ffffc9000d4cf170 R08: ffffffff83958865 R09: 1ffffffff203a065
R10: dffffc0000000000 R11: fffffbfff203a066 R12: 1ffff92001a99e10
R13: ffff888012259c00 R14: ffff88801fd83e00 R15: dffffc0000000000
FS:  00007fef2b9c46c0(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000560fa8a720b8 CR3: 000000001cdca000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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 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] 4+ messages in thread

* Re: [syzbot] [ocfs2?] kernel BUG in ocfs2_reserve_suballoc_bits
  2024-11-01 20:51 syzbot
@ 2024-11-06 23:12 ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-11-06 23:12 UTC (permalink / raw)
  To: jlbec, joseph.qi, linux-kernel, mark, ocfs2-devel, syzkaller-bugs

syzbot has found a reproducer for the following issue on:

HEAD commit:    7758b206117d Merge tag 'tracefs-v6.12-rc6' of git://git.ke..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=100d76a7980000
kernel config:  https://syzkaller.appspot.com/x/.config?x=11254d3590b16717
dashboard link: https://syzkaller.appspot.com/bug?extid=fd05de09d1267725aa95
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=17984d87980000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=13745f40580000

Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/7feb34a89c2a/non_bootable_disk-7758b206.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/2bb57fc511dd/vmlinux-7758b206.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b3cbc90748c2/bzImage-7758b206.xz
mounted in repro #1: https://storage.googleapis.com/syzbot-assets/6240dda90037/mount_0.gz
mounted in repro #2: https://storage.googleapis.com/syzbot-assets/ee2f9e0a7c70/mount_8.gz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+fd05de09d1267725aa95@syzkaller.appspotmail.com

(syz-executor421,5309,0):ocfs2_prepare_inode_for_write:2273 ERROR: status = -30
(syz-executor421,5309,0):ocfs2_file_write_iter:2452 ERROR: status = -30
------------[ cut here ]------------
kernel BUG at fs/ocfs2/suballoc.c:804!
Oops: invalid opcode: 0000 [#1] PREEMPT SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5309 Comm: syz-executor421 Not tainted 6.12.0-rc6-syzkaller-00099-g7758b206117d #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:ocfs2_reserve_suballoc_bits+0x479b/0x4eb0 fs/ocfs2/suballoc.c:804
Code: e1 07 80 c1 03 38 c1 0f 8c 75 dd ff ff 48 8d bc 24 b0 01 00 00 e8 b5 b9 68 fe e9 63 dd ff ff e8 3b 4f 31 08 e8 e6 f2 fe fd 90 <0f> 0b e8 de f2 fe fd 48 c7 c7 20 ad e3 8e 48 8b 74 24 28 48 89 da
RSP: 0018:ffffc9000d0463c0 EFLAGS: 00010293
RAX: ffffffff8395e77a RBX: 00000000ffffffff RCX: ffff88801f0fc880
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc9000d0468b0 R08: ffffffff8395a255 R09: 1ffffffff203a11d
R10: dffffc0000000000 R11: fffffbfff203a11e R12: 1ffff92001a08cf8
R13: ffff888033156700 R14: ffff8880405a7e00 R15: dffffc0000000000
FS:  0000555588c64380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056114eea6000 CR3: 000000003a6b6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 ocfs2_reserve_cluster_bitmap_bits+0xc5/0x1d0 fs/ocfs2/suballoc.c:1132
 ocfs2_local_alloc_reserve_for_window fs/ocfs2/localalloc.c:1125 [inline]
 ocfs2_local_alloc_slide_window fs/ocfs2/localalloc.c:1261 [inline]
 ocfs2_reserve_local_alloc_bits+0x95e/0x2870 fs/ocfs2/localalloc.c:669
 ocfs2_reserve_clusters_with_limit+0x1b8/0xb60 fs/ocfs2/suballoc.c:1166
 ocfs2_convert_inline_data_to_extents+0x29d/0x17f0 fs/ocfs2/alloc.c:7078
 ocfs2_try_to_write_inline_data fs/ocfs2/aops.c:1561 [inline]
 ocfs2_write_begin_nolock+0x1c7b/0x4ec0 fs/ocfs2/aops.c:1668
 ocfs2_write_begin+0x205/0x3a0 fs/ocfs2/aops.c:1902
 generic_perform_write+0x344/0x6d0 mm/filemap.c:4054
 ocfs2_file_write_iter+0x17b1/0x1f50 fs/ocfs2/file.c:2467
 new_sync_write fs/read_write.c:590 [inline]
 vfs_write+0xaeb/0xd30 fs/read_write.c:683
 ksys_write+0x183/0x2b0 fs/read_write.c:736
 do_syscall_x64 arch/x86/entry/common.c:52 [inline]
 do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f986bf8f1b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 61 17 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 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:00007fffaa60abc8 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 000000000000204e RCX: 00007f986bf8f1b9
RDX: 0000000000000048 RSI: 0000000020000200 RDI: 0000000000000004
RBP: 00007f986c00c610 R08: 000000000000000a R09: 00007fffaa60ad98
R10: 00000000fffffa00 R11: 0000000000000246 R12: 0000000000000001
R13: 00007fffaa60ad88 R14: 0000000000000001 R15: 0000000000000001
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_reserve_suballoc_bits+0x479b/0x4eb0 fs/ocfs2/suballoc.c:804
Code: e1 07 80 c1 03 38 c1 0f 8c 75 dd ff ff 48 8d bc 24 b0 01 00 00 e8 b5 b9 68 fe e9 63 dd ff ff e8 3b 4f 31 08 e8 e6 f2 fe fd 90 <0f> 0b e8 de f2 fe fd 48 c7 c7 20 ad e3 8e 48 8b 74 24 28 48 89 da
RSP: 0018:ffffc9000d0463c0 EFLAGS: 00010293
RAX: ffffffff8395e77a RBX: 00000000ffffffff RCX: ffff88801f0fc880
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc9000d0468b0 R08: ffffffff8395a255 R09: 1ffffffff203a11d
R10: dffffc0000000000 R11: fffffbfff203a11e R12: 1ffff92001a08cf8
R13: ffff888033156700 R14: ffff8880405a7e00 R15: dffffc0000000000
FS:  0000555588c64380(0000) GS:ffff88801fc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 000056114eea6000 CR3: 000000003a6b6000 CR4: 0000000000352ef0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400


---
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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [ocfs2?] kernel BUG in ocfs2_reserve_suballoc_bits
       [not found] <20241120081457.R0Qrp%dmantipov@yandex.ru>
@ 2024-11-20  8:35 ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2024-11-20  8:35 UTC (permalink / raw)
  To: dmantipov, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
possible deadlock in __submit_bio

======================================================
WARNING: possible circular locking dependency detected
6.12.0-syzkaller-01782-gbf9aa14fc523-dirty #0 Not tainted
------------------------------------------------------
kswapd0/74 is trying to acquire lock:
ffff888000cf9438 (&q->q_usage_counter(io)#37){++++}-{0:0}, at: __submit_bio+0x2c6/0x560 block/blk-core.c:629

but task is already holding lock:
ffffffff8ea3bfe0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6850 [inline]
ffffffff8ea3bfe0 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0xbf1/0x3700 mm/vmscan.c:7232

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (fs_reclaim){+.+.}-{0:0}:
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
       __fs_reclaim_acquire mm/page_alloc.c:3851 [inline]
       fs_reclaim_acquire+0x88/0x130 mm/page_alloc.c:3865
       might_alloc include/linux/sched/mm.h:318 [inline]
       slab_pre_alloc_hook mm/slub.c:4036 [inline]
       slab_alloc_node mm/slub.c:4114 [inline]
       __do_kmalloc_node mm/slub.c:4263 [inline]
       __kmalloc_node_noprof+0xb0/0x440 mm/slub.c:4270
       __kvmalloc_node_noprof+0x72/0x190 mm/util.c:658
       sbitmap_init_node+0x2d4/0x670 lib/sbitmap.c:132
       scsi_realloc_sdev_budget_map+0x2a7/0x460 drivers/scsi/scsi_scan.c:246
       scsi_add_lun drivers/scsi/scsi_scan.c:1106 [inline]
       scsi_probe_and_add_lun+0x3173/0x4bd0 drivers/scsi/scsi_scan.c:1287
       __scsi_add_device+0x228/0x2f0 drivers/scsi/scsi_scan.c:1622
       ata_scsi_scan_host+0x236/0x740 drivers/ata/libata-scsi.c:4575
       async_run_entry_fn+0xa8/0x420 kernel/async.c:129
       process_one_work kernel/workqueue.c:3229 [inline]
       process_scheduled_works+0xa63/0x1850 kernel/workqueue.c:3310
       worker_thread+0x870/0xd30 kernel/workqueue.c:3391
       kthread+0x2f0/0x390 kernel/kthread.c:389
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

-> #0 (&q->q_usage_counter(io)#37){++++}-{0:0}:
       check_prev_add kernel/locking/lockdep.c:3161 [inline]
       check_prevs_add kernel/locking/lockdep.c:3280 [inline]
       validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
       __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226
       lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
       bio_queue_enter block/blk.h:75 [inline]
       blk_mq_submit_bio+0x1536/0x23a0 block/blk-mq.c:3092
       __submit_bio+0x2c6/0x560 block/blk-core.c:629
       __submit_bio_noacct_mq block/blk-core.c:710 [inline]
       submit_bio_noacct_nocheck+0x4d3/0xe30 block/blk-core.c:739
       swap_writepage_bdev_async mm/page_io.c:449 [inline]
       __swap_writepage+0x5fc/0x1400 mm/page_io.c:472
       swap_writepage+0x85d/0xfa0 mm/page_io.c:288
       pageout mm/vmscan.c:689 [inline]
       shrink_folio_list+0x3c0e/0x8cc0 mm/vmscan.c:1367
       evict_folios+0x549b/0x7b50 mm/vmscan.c:4589
       try_to_shrink_lruvec+0x9ab/0xbb0 mm/vmscan.c:4784
       shrink_one+0x3b9/0x850 mm/vmscan.c:4822
       shrink_many mm/vmscan.c:4885 [inline]
       lru_gen_shrink_node mm/vmscan.c:4963 [inline]
       shrink_node+0x3789/0x3e10 mm/vmscan.c:5943
       kswapd_shrink_node mm/vmscan.c:6771 [inline]
       balance_pgdat mm/vmscan.c:6963 [inline]
       kswapd+0x1ca9/0x3700 mm/vmscan.c:7232
       kthread+0x2f0/0x390 kernel/kthread.c:389
       ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
       ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(fs_reclaim);
                               lock(&q->q_usage_counter(io)#37);
                               lock(fs_reclaim);
  rlock(&q->q_usage_counter(io)#37);

 *** DEADLOCK ***

1 lock held by kswapd0/74:
 #0: ffffffff8ea3bfe0 (fs_reclaim){+.+.}-{0:0}, at: balance_pgdat mm/vmscan.c:6850 [inline]
 #0: ffffffff8ea3bfe0 (fs_reclaim){+.+.}-{0:0}, at: kswapd+0xbf1/0x3700 mm/vmscan.c:7232

stack backtrace:
CPU: 0 UID: 0 PID: 74 Comm: kswapd0 Not tainted 6.12.0-syzkaller-01782-gbf9aa14fc523-dirty #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2074
 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2206
 check_prev_add kernel/locking/lockdep.c:3161 [inline]
 check_prevs_add kernel/locking/lockdep.c:3280 [inline]
 validate_chain+0x18ef/0x5920 kernel/locking/lockdep.c:3904
 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5226
 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5849
 bio_queue_enter block/blk.h:75 [inline]
 blk_mq_submit_bio+0x1536/0x23a0 block/blk-mq.c:3092
 __submit_bio+0x2c6/0x560 block/blk-core.c:629
 __submit_bio_noacct_mq block/blk-core.c:710 [inline]
 submit_bio_noacct_nocheck+0x4d3/0xe30 block/blk-core.c:739
 swap_writepage_bdev_async mm/page_io.c:449 [inline]
 __swap_writepage+0x5fc/0x1400 mm/page_io.c:472
 swap_writepage+0x85d/0xfa0 mm/page_io.c:288
 pageout mm/vmscan.c:689 [inline]
 shrink_folio_list+0x3c0e/0x8cc0 mm/vmscan.c:1367
 evict_folios+0x549b/0x7b50 mm/vmscan.c:4589
 try_to_shrink_lruvec+0x9ab/0xbb0 mm/vmscan.c:4784
 shrink_one+0x3b9/0x850 mm/vmscan.c:4822
 shrink_many mm/vmscan.c:4885 [inline]
 lru_gen_shrink_node mm/vmscan.c:4963 [inline]
 shrink_node+0x3789/0x3e10 mm/vmscan.c:5943
 kswapd_shrink_node mm/vmscan.c:6771 [inline]
 balance_pgdat mm/vmscan.c:6963 [inline]
 kswapd+0x1ca9/0x3700 mm/vmscan.c:7232
 kthread+0x2f0/0x390 kernel/kthread.c:389
 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244
 </TASK>


Tested on:

commit:         bf9aa14f Merge tag 'timers-core-2024-11-18' of git://g..
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=17184b78580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=48190c1cdf985419
dashboard link: https://syzkaller.appspot.com/bug?extid=fd05de09d1267725aa95
compiler:       Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
patch:          https://syzkaller.appspot.com/x/patch.diff?x=153646c0580000


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [syzbot] [ocfs2?] kernel BUG in ocfs2_reserve_suballoc_bits
       [not found] <20251022150519.sco_Q%dmantipov@yandex.ru>
@ 2025-10-22 15:36 ` syzbot
  0 siblings, 0 replies; 4+ messages in thread
From: syzbot @ 2025-10-22 15:36 UTC (permalink / raw)
  To: dmantipov, linux-kernel, syzkaller-bugs

Hello,

syzbot has tested the proposed patch but the reproducer is still triggering an issue:
kernel BUG in ocfs2_reserve_suballoc_bits

------------[ cut here ]------------
kernel BUG at fs/ocfs2/suballoc.c:820!
Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
CPU: 0 UID: 0 PID: 5814 Comm: syz.0.16 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014
RIP: 0010:ocfs2_reserve_suballoc_bits+0x3f67/0x46f0 fs/ocfs2/suballoc.c:820
Code: 24 98 00 00 00 80 e1 07 fe c1 38 c1 0f 8c a0 f0 ff ff 48 8b bc 24 98 00 00 00 e8 a4 15 79 fe e9 8e f0 ff ff e8 3a d6 11 fe 90 <0f> 0b 89 d1 80 e1 07 fe c1 38 c1 0f 8c d7 db ff ff 48 8b 7c 24 30
RSP: 0018:ffffc90002bbdca0 EFLAGS: 00010293
RAX: ffffffff83addc46 RBX: ffff888040d64fb8 RCX: ffff8880002cc900
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc90002bbe170 R08: ffffffff8f7c7677 R09: 1ffffffff1ef8ece
R10: dffffc0000000000 R11: fffffbfff1ef8ecf R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88804306ce00 R15: 00000000ffffffff
FS:  00007f125eda36c0(0000) GS:ffff88808d75f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f125ed80fb8 CR3: 00000000578b5000 CR4: 0000000000352ef0
Call Trace:
 <TASK>
 ocfs2_reserve_cluster_bitmap_bits+0xc4/0x1c0 fs/ocfs2/suballoc.c:1148
 ocfs2_local_alloc_reserve_for_window fs/ocfs2/localalloc.c:1106 [inline]
 ocfs2_local_alloc_slide_window fs/ocfs2/localalloc.c:1242 [inline]
 ocfs2_reserve_local_alloc_bits+0x88f/0x24b0 fs/ocfs2/localalloc.c:669
 ocfs2_reserve_clusters_with_limit+0x1be/0xba0 fs/ocfs2/suballoc.c:1182
 ocfs2_reserve_clusters fs/ocfs2/suballoc.c:1243 [inline]
 ocfs2_lock_allocators+0x2fa/0x5c0 fs/ocfs2/suballoc.c:2789
 ocfs2_write_begin_nolock+0x2279/0x4340 fs/ocfs2/aops.c:1719
 ocfs2_dio_wr_get_block+0xb6f/0x1770 fs/ocfs2/aops.c:2214
 get_more_blocks fs/direct-io.c:648 [inline]
 do_direct_IO fs/direct-io.c:936 [inline]
 __blockdev_direct_IO+0x16ff/0x3490 fs/direct-io.c:1243
 ocfs2_direct_IO+0x25f/0x2d0 fs/ocfs2/aops.c:2441
 generic_file_direct_write+0x1db/0x3e0 mm/filemap.c:4176
 __generic_file_write_iter+0x11d/0x230 mm/filemap.c:4345
 ocfs2_file_write_iter+0x157a/0x1d10 fs/ocfs2/file.c:2469
 iter_file_splice_write+0x975/0x10e0 fs/splice.c:738
 do_splice_from fs/splice.c:938 [inline]
 direct_splice_actor+0x101/0x160 fs/splice.c:1161
 splice_direct_to_actor+0x5a8/0xcc0 fs/splice.c:1105
 do_splice_direct_actor fs/splice.c:1204 [inline]
 do_splice_direct+0x181/0x270 fs/splice.c:1230
 do_sendfile+0x4da/0x7e0 fs/read_write.c:1370
 __do_sys_sendfile64 fs/read_write.c:1431 [inline]
 __se_sys_sendfile64+0x13e/0x190 fs/read_write.c:1417
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xfa/0xfa0 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f125df8e929
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f125eda3038 EFLAGS: 00000246 ORIG_RAX: 0000000000000028
RAX: ffffffffffffffda RBX: 00007f125e1b5fa0 RCX: 00007f125df8e929
RDX: 0000000000000000 RSI: 0000000000000007 RDI: 0000000000000008
RBP: 00007f125e010b39 R08: 0000000000000000 R09: 0000000000000000
R10: 000000080000000c R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f125e1b5fa0 R15: 00007fff162fbea8
 </TASK>
Modules linked in:
---[ end trace 0000000000000000 ]---
RIP: 0010:ocfs2_reserve_suballoc_bits+0x3f67/0x46f0 fs/ocfs2/suballoc.c:820
Code: 24 98 00 00 00 80 e1 07 fe c1 38 c1 0f 8c a0 f0 ff ff 48 8b bc 24 98 00 00 00 e8 a4 15 79 fe e9 8e f0 ff ff e8 3a d6 11 fe 90 <0f> 0b 89 d1 80 e1 07 fe c1 38 c1 0f 8c d7 db ff ff 48 8b 7c 24 30
RSP: 0018:ffffc90002bbdca0 EFLAGS: 00010293
RAX: ffffffff83addc46 RBX: ffff888040d64fb8 RCX: ffff8880002cc900
RDX: 0000000000000000 RSI: 00000000ffffffff RDI: 0000000000000000
RBP: ffffc90002bbe170 R08: ffffffff8f7c7677 R09: 1ffffffff1ef8ece
R10: dffffc0000000000 R11: fffffbfff1ef8ecf R12: 0000000000000000
R13: dffffc0000000000 R14: ffff88804306ce00 R15: 00000000ffffffff
FS:  00007f125eda36c0(0000) GS:ffff88808d75f000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f125ed80fb8 CR3: 00000000578b5000 CR4: 0000000000352ef0


Tested on:

commit:         552c5071 Merge tag 'vfio-v6.18-rc3' of https://github...
git tree:       https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=154c3734580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=cb89820a01e5d251
dashboard link: https://syzkaller.appspot.com/bug?extid=fd05de09d1267725aa95
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
patch:          https://syzkaller.appspot.com/x/patch.diff?x=13d43734580000


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-22 15:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20241120081457.R0Qrp%dmantipov@yandex.ru>
2024-11-20  8:35 ` [syzbot] [ocfs2?] kernel BUG in ocfs2_reserve_suballoc_bits syzbot
     [not found] <20251022150519.sco_Q%dmantipov@yandex.ru>
2025-10-22 15:36 ` syzbot
2024-11-01 20:51 syzbot
2024-11-06 23:12 ` syzbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox