On 10/25/25 06:35, Jens Axboe wrote: >> ------------[ cut here ]------------ >> WARNING: kernel/trace/blktrace.c:368 at __blk_add_trace+0x79c/0x8d0 >> kernel/trace/blktrace.c:367, CPU#0: jbd2/sda1-8/5163 >> Modules linked in: >> CPU: 0 UID: 0 PID: 5163 Comm: jbd2/sda1-8 Not tainted syzkaller #0 >> PREEMPT(full) >> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS >> Google 10/02/2025 >> RIP: 0010:__blk_add_trace+0x79c/0x8d0 kernel/trace/blktrace.c:367 >> Code: ff 4d 85 e4 75 4f e8 83 0e f8 ff e9 fb fd ff ff e8 79 0e f8 ff e9 ec >> fd ff ff e8 6f 0e f8 ff e9 d8 fd ff ff e8 65 0e f8 ff 90 <0f> 0b 90 e9 ca fd >> ff ff e8 57 0e f8 ff 48 8b 7c 24 30 e8 cd 51 00 >> RSP: 0018:ffffc9000e54f460 EFLAGS: 00010293 >> RAX: ffffffff81c81b4b RBX: 0000000000000001 RCX: ffff8880341abc80 >> RDX: 0000000000000000 RSI: 00000000901e000f RDI: 000000008000ffff >> RBP: ffffc9000e54f578 R08: ffff8880341abc80 R09: 0000000000000009 >> R10: 0000000000000011 R11: 0000000000000000 R12: 000000008000ffff >> R13: ffff888075c86080 R14: 00000000901e000f R15: 0000000000000001 >> FS: 0000000000000000(0000)GS:ffff888125f22000(0000) knlGS:0000000000000000 >> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 >> CR2: 0000555577629808 CR3: 000000000dd38000 CR4: 00000000003526f0 >> Call Trace: >> <TASK> >> blk_add_trace_bio_remap+0x4b8/0x560 kernel/trace/blktrace.c:1200 >> __do_trace_block_bio_remap include/trace/events/block.h:526 [inline] >> trace_block_bio_remap include/trace/events/block.h:526 [inline] >> blk_partition_remap block/blk-core.c:585 [inline] >> submit_bio_noacct+0x187b/0x1b80 block/blk-core.c:804 >> journal_submit_commit_record+0x665/0x8b0 fs/jbd2/commit.c:156 >> jbd2_journal_commit_transaction+0x3455/0x5a00 fs/jbd2/commit.c:875 >> kjournald2+0x3cf/0x750 fs/jbd2/journal.c:201 >> kthread+0x711/0x8a0 kernel/kthread.c:463 >> ret_from_fork+0x4bc/0x870 arch/x86/kernel/process.c:158 >> ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 >> </TASK> > Adding Johannes.
This seems to make WARN_ON_ONCE() go away if you find this fix useful I'll send a proper patch :- diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 6ad3807a5b73..b4662c5636a6 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -365,7 +365,7 @@ static void __blk_add_trace(struct blk_trace *bt, sector_t sector, int bytes, } if (WARN_ON_ONCE(bt->version == 1 && - (what >> BLK_TC_SHIFT) > BLK_TC_END_V1)) + (what >> BLK_TC_SHIFT) & ~((u64)BLK_TC_END_V1 * 2 - 1))) return; if (cgid) also would you prefer this to be ratelimited print or keep warn_on_once() and add debug print ? when I sent you the code for blktrace_ext that cover letter has some tests, not demanding anything here but it'd nice to have those in the blktests especially for the REQ_OP_ZONEXXX, so we all can run regularly. Else I'll add this to my TODO for blktests along with 15 testcases sitting in my private tree to go upstream. -ck
