Re: [syzbot] WARNING in io_wqe_enqueue

From: Hao Xu
Date: Wed Jun 09 2021 - 23:04:05 EST

在 2021/6/8 下午8:01, Dmitry Vyukov 写道:
On Tue, Jun 8, 2021 at 11:47 AM Hao Xu <haoxu@xxxxxxxxxxxxxxxxx> wrote:

在 2021/6/5 上午4:22, syzbot 写道:
syzbot has bisected this issue to:

commit 24369c2e3bb06d8c4e71fd6ceaf4f8a01ae79b7c
Author: Pavel Begunkov <asml.silence@xxxxxxxxx>
Date: Tue Jan 28 00:15:48 2020 +0000

io_uring: add io-wq workqueue sharing

bisection log:
start commit: f88cd3fb Merge tag 'vfio-v5.13-rc5' of git://
git tree: upstream
final oops:
console output:
kernel config:
dashboard link:
syz repro:
C reproducer:

Reported-by: syzbot+ea2f1484cffe5109dc10@xxxxxxxxxxxxxxxxxxxxxxxxx
Fixes: 24369c2e3bb0 ("io_uring: add io-wq workqueue sharing")

For information about bisection process see:

This is not a bug, the repro program first set RLIMIT_NPROC to 0, then
submits an unbound work whcih raises a warning of
WARN_ON_ONCE(!acct->max_workers). Since unbound->max_workers is
task_rlimit(current, RLIMIT_NPROC), so it is expected.

Hi Hao,

Then this is a mis-use of WARN_ON. If this check is intended for end
users, it needs to use pr_err (also print understandable message and
no stack trace which is most likely not useful for end users):

Agree, pr_err/pr_warn is better here.