Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4556678pxj; Tue, 8 Jun 2021 17:56:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxS9McZ0yLQ4+LGJhVo/oKhLWFr2NBk8T83oSwf8H3A2/bgi+geTYepjjofR7uH9wsScshO X-Received: by 2002:a17:906:c311:: with SMTP id s17mr25540016ejz.202.1623200162797; Tue, 08 Jun 2021 17:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623200162; cv=none; d=google.com; s=arc-20160816; b=QFfCuXNiW1jtJonpMfhcy7N7HkT1k3M+YKSK6W9MO0pgr0zJMm2sVZeX3rDv9PNrX/ 0qh8D9qB2VmW+5fZgK69eNLdsHrDV0ux4JzxpSKBmJaDLYErjW0Th3CDX4hBrl1R7esg OOq/CD+/qDq9iaJSeSmdS/H78HhUCkbxLWDS+nR3p2JZ7UizBp1/+YVYWoFFaFyC8Pj1 WBFA02GGvqloAi7NsxcdMxzpmJx++NOsVFpl5ePk/feW/3uEVtNK4emjIqiJV2TpbeDh eQiEVLGqyjbI+873PABcbpSq/NfXzTz0/gIcAR/PkHDeMXw8mW4WOUcskGFSChqXeqmA TgPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7GrlCKInRHwinOrKZ1wqy6YkpdctxLsTgU+gfy4jB+o=; b=cE0Fz75ZCs2n6M2v5b05c133DYYEX05l0ctS2PhFEcA0bVkMdu4ClIUpjC0mh1Ec5f Eh3v9kYQcfdOqKm7+OCaaaI89C6dfrp3/SMF1z2CoWUA1Q4N2oS1sA8WDD2EJLk58oIi Bt1sTPj0jrr+FiEWxMdKHLtkLRBR7fQUoo371/vFynW0bCttJ7LsaAtfUs4+gAg8EAG/ WN650kq+z7gKOHfNkfeyIgRMT8h+I8ykZnneN8TeETIA16P8R7VIpyIiLVVU3evqbXJQ ng7i3eHsG4DWv66Ze4C4IxVbYM43V1w/mIQGg2O96cDkkR50jjR/X00oXoXqlFmPq9wn CJNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CGoheWvk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si1019451edd.533.2021.06.08.17.55.39; Tue, 08 Jun 2021 17:56:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CGoheWvk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232285AbhFHMEh (ORCPT + 99 others); Tue, 8 Jun 2021 08:04:37 -0400 Received: from mail-qk1-f182.google.com ([209.85.222.182]:45776 "EHLO mail-qk1-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232054AbhFHMEh (ORCPT ); Tue, 8 Jun 2021 08:04:37 -0400 Received: by mail-qk1-f182.google.com with SMTP id d196so14711407qkg.12 for ; Tue, 08 Jun 2021 05:02:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=7GrlCKInRHwinOrKZ1wqy6YkpdctxLsTgU+gfy4jB+o=; b=CGoheWvkuPtRqaZ+7Tf129L50H3/R+jhpu7NCmpmE2SHWpJvx5RZPy1MhDH70Wa8bG HiG9gBkZhiNGRbUgQMMb4D5SMZN/j5SkCQU81eJo7UefWL5gv5D2+oPcVZfJwXOLkXj9 AmD02ecSa9st3Am/8RQr/0KEDNSzLy9bL16x6YWmW2sCEOQRFeTgA8NUScQIwSD43xE8 MAMDAMS2iwQW4mIyyrH9IztufHeNYf5Vf1jzuN0g9VZ+1czLk9zF4tFlFZpexrjhoUHF Wu70sN8NpAe7fO7LMTEv6GRaO7sowvV47wPVIK0VzR5/211Gqj+hJmAw7cciA0Kydam2 XXLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=7GrlCKInRHwinOrKZ1wqy6YkpdctxLsTgU+gfy4jB+o=; b=QixG2r45YQLFHHVdyJdx8f3aS7Nae1D+gmrkXLjB7uHaV/NGM0OULcU2S3TM6zgUBr gmiaQno8OK86gmhK1mzDZu/kHEz9aoMCMjC2Qv+cjaP3MXeCCq6xgBfrNmaRSnN27UDK rS8+Wl1Lq5cG8HmHww6BjaW7GQ1vJSPa8A4M8IqgUO+c/cQgW1GZFuq6Wg0g8KVuukcP th3tqExfeLpRjJNWoFEWFQoJiAafbr8Ur/P5RPQ7VKaZDXuZDD0sBqeQ/v4hSmaL56Bd LGgKYQHMB4XVzWSpvx5Um6rKiYrT9xOB6NRy8x6wJnWPX3P8ZTZfEMW5+Ri92PPPcJor 9bLg== X-Gm-Message-State: AOAM530Owkgunp0d+RgrXucuIXeNTunXtY6dn3wsc5sm3wZAYeN+5oi4 F6aUdrTKkgM04NJ0y/auPyAIRd+5d06+U/1+9ccx9g== X-Received: by 2002:a37:9d93:: with SMTP id g141mr21071495qke.350.1623153691261; Tue, 08 Jun 2021 05:01:31 -0700 (PDT) MIME-Version: 1.0 References: <0000000000000bdfa905c3f6720f@google.com> In-Reply-To: From: Dmitry Vyukov Date: Tue, 8 Jun 2021 14:01:19 +0200 Message-ID: Subject: Re: [syzbot] WARNING in io_wqe_enqueue To: Hao Xu Cc: syzbot , Pavel Begunkov , Jens Axboe , io-uring@vger.kernel.org, linux-fsdevel , LKML , syzkaller-bugs , Al Viro Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 8, 2021 at 11:47 AM Hao Xu wrote: > > =E5=9C=A8 2021/6/5 =E4=B8=8A=E5=8D=884:22, syzbot =E5=86=99=E9=81=93: > > syzbot has bisected this issue to: > > > > commit 24369c2e3bb06d8c4e71fd6ceaf4f8a01ae79b7c > > Author: Pavel Begunkov > > Date: Tue Jan 28 00:15:48 2020 +0000 > > > > io_uring: add io-wq workqueue sharing > > > > bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=3D17934777= d00000 > > start commit: f88cd3fb Merge tag 'vfio-v5.13-rc5' of git://github.com= /aw.. > > git tree: upstream > > final oops: https://syzkaller.appspot.com/x/report.txt?x=3D14534777= d00000 > > console output: https://syzkaller.appspot.com/x/log.txt?x=3D10534777d00= 000 > > kernel config: https://syzkaller.appspot.com/x/.config?x=3D82d85e75046= e5e64 > > dashboard link: https://syzkaller.appspot.com/bug?extid=3Dea2f1484cffe5= 109dc10 > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=3D16d5772fd= 00000 > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=3D10525947d00= 000 > > > > Reported-by: syzbot+ea2f1484cffe5109dc10@syzkaller.appspotmail.com > > Fixes: 24369c2e3bb0 ("io_uring: add io-wq workqueue sharing") > > > > For information about bisection process see: https://goo.gl/tpsmEJ#bise= ction > > > 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): https://elixir.bootlin.com/linux/v5.13-rc5/source/include/asm-generic/bug.h= #L71