From: Nilay Shroff <nilay@linux.ibm.com>
To: Yuto Ohnuki <ytohnuki@amazon.com>, Jens Axboe <axboe@kernel.dk>
Cc: Yu Kuai <yukuai@fnnas.com>, Ming Lei <ming.lei@redhat.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+71fcf20f7c1e5043d78c@syzkaller.appspotmail.com
Subject: Re: [PATCH v2] blk-wbt: remove WARN_ON_ONCE from wbt_init_enable_default()
Date: Mon, 16 Mar 2026 15:02:07 +0530 [thread overview]
Message-ID: <5984dfd9-04ae-4387-9a2e-f995b0781b92@linux.ibm.com> (raw)
In-Reply-To: <20260316070358.65225-2-ytohnuki@amazon.com>
On 3/16/26 12:33 PM, Yuto Ohnuki wrote:
> wbt_init_enable_default() uses WARN_ON_ONCE to check for failures from
> wbt_alloc() and wbt_init(). However, both are expected failure paths:
>
> - wbt_alloc() can return NULL under memory pressure (-ENOMEM)
> - wbt_init() can fail with -EBUSY if wbt is already registered
>
> syzbot triggers this by injecting memory allocation failures during MTD
> partition creation via ioctl(BLKPG), causing a spurious warning.
>
> wbt_init_enable_default() is a best-effort initialization called from
> blk_register_queue() with a void return type. Failure simply means the
> disk operates without writeback throttling, which is harmless.
>
> Replace WARN_ON_ONCE with plain if-checks, consistent with how
> wbt_set_lat() in the same file already handles these failures. Add a
> pr_warn() for the wbt_init() failure to retain diagnostic information
> without triggering a full stack trace.
>
> Reported-by:syzbot+71fcf20f7c1e5043d78c@syzkaller.appspotmail.com
> Closes:https://syzkaller.appspot.com/bug?extid=71fcf20f7c1e5043d78c
> Fixes: 41afaeeda509 ("blk-wbt: fix possible deadlock to nest pcpu_alloc_mutex under q_usage_counter")
> Signed-off-by: Yuto Ohnuki<ytohnuki@amazon.com>
Looks good to me:
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
next prev parent reply other threads:[~2026-03-16 9:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 7:03 Yuto Ohnuki
2026-03-16 9:32 ` Nilay Shroff [this message]
2026-03-23 4:30 ` Yu Kuai
2026-04-04 14:56 ` Yuto Ohnuki
2026-04-06 19:03 ` Jens Axboe
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=5984dfd9-04ae-4387-9a2e-f995b0781b92@linux.ibm.com \
--to=nilay@linux.ibm.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=syzbot+71fcf20f7c1e5043d78c@syzkaller.appspotmail.com \
--cc=ytohnuki@amazon.com \
--cc=yukuai@fnnas.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
all inboxes | Powered by JetHome®