From: Johannes Thumshirn <Johannes.Thumshirn@wdc.com>
To: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Cc: syzbot <syzbot+153e64c0aa875d7e4c37@syzkaller.appspotmail.com>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-trace-kernel@vger.kernel.org"
<linux-trace-kernel@vger.kernel.org>,
"mathieu.desnoyers@efficios.com" <mathieu.desnoyers@efficios.com>,
"mhiramat@kernel.org" <mhiramat@kernel.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"syzkaller-bugs@googlegroups.com"
<syzkaller-bugs@googlegroups.com>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [syzbot] [block?] [trace?] WARNING in __blk_add_trace
Date: Mon, 27 Oct 2025 06:51:20 +0000 [thread overview]
Message-ID: <f41782a9-7e2e-46f6-84a0-2484c75d9716@wdc.com> (raw)
In-Reply-To: <cc31bf15-5c9e-43b5-9615-2475aebd1d53@nvidia.com>
On 10/26/25 5:55 AM, Chaitanya Kulkarni wrote:
> 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
>
>
>
Looks good, thanks Chaitanya
prev parent reply other threads:[~2025-10-27 6:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-24 23:11 [syzbot] [block?] [trace?] WARNING in __blk_add_trace syzbot
2025-10-25 12:19 ` syzbot
2025-10-25 13:35 ` Jens Axboe
2025-10-26 4:55 ` Chaitanya Kulkarni
2025-10-26 5:43 ` Chaitanya Kulkarni
2025-10-27 6:51 ` Johannes Thumshirn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f41782a9-7e2e-46f6-84a0-2484c75d9716@wdc.com \
--to=johannes.thumshirn@wdc.com \
--cc=axboe@kernel.dk \
--cc=chaitanyak@nvidia.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--cc=syzbot+153e64c0aa875d7e4c37@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox