Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1005849iof; Mon, 6 Jun 2022 17:56:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoZOpUe0BSO8BAxBDC2XmA+uub+9ZTfsROTI07ZCkUhDNI8nDh4/7V+WeCLeD+Zkq61t97 X-Received: by 2002:a17:907:a0ca:b0:6f8:5bef:b9c with SMTP id hw10-20020a170907a0ca00b006f85bef0b9cmr24356248ejc.630.1654563390974; Mon, 06 Jun 2022 17:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654563390; cv=none; d=google.com; s=arc-20160816; b=XWZogfkhbv3zqjCC3e6KYWjLAY33GrSCA0wnhWn9al9yDkRR24XIDbEE3MEcJ5xvSw +xb+A455lpemW6jSgJHXLqXuGRE+nmehcGMxmIgDPzY1kHRXIBDiLBBG1C2R1w2a7ilc tGpsdDs6fdfYShpjbdC4/yUXh5qw+KKwvc9Zn1E4J6zpS11WZ7HvJ9BhrXTshagkUGj6 Ctvcp/gcLq+7fuUyGHBaNsh0wa+fDfdij//DVUyCFpfPIn+nIJ3sdinaiNrswaQD0rx4 dFTYWYuwdmumZygK+JWY6Qbl09ndJ3rBbUxDJqwbz6Ms0B6FtQoeKVoGyaw8Hq1OdcM2 3SkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=Gt4DBYgcXVKDG81Upnb2aG0Q8F7JkfTTCfOh0AVQT9U=; b=eSnaHi9S6fO/XLWbBcPiavur4Sx6kXE1BPyd+HecZPsdyKw543IAEQjmvg6QpXn6iR XQIeDl507UIZNnpGGJERT/S+9j2y/2hZZmBlgbiRhfF30x5YUggcgnfpuTz/COSuq2g7 B7yCOO69j7D4K8HvnAujeCx6OQUXP5CehOkVdqkvUDOsD/A2C6UMoDtNHRmAz3dSdaYL s/mCGUQVfOQ3HIOSENEINkSb73lNyg+1pqs8ronSdxSHG5fhDZb71N3bmfZRgV5c6t/L osR4DmpsFYnIfNQdEyKGBWByVdllQkjf0cn9M6xFyCWijAilVzxw3RjbPBAiqf4HcNE0 GyCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Oh/h0Hqf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds9-20020a170907724900b00711da366315si2476383ejc.717.2022.06.06.17.56.05; Mon, 06 Jun 2022 17:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="Oh/h0Hqf"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235298AbiFFXfS (ORCPT + 99 others); Mon, 6 Jun 2022 19:35:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60840 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235302AbiFFXfO (ORCPT ); Mon, 6 Jun 2022 19:35:14 -0400 Received: from out2.migadu.com (out2.migadu.com [188.165.223.204]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 227214D622 for ; Mon, 6 Jun 2022 16:35:12 -0700 (PDT) Date: Mon, 6 Jun 2022 16:35:05 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1654558510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Gt4DBYgcXVKDG81Upnb2aG0Q8F7JkfTTCfOh0AVQT9U=; b=Oh/h0HqfGHO/3nl2vC7PhrBmFqKhuAGU0yX+COkhggj2alXkzkm+Lo2CQE/18WE9Rt4XaT 7elTH9cN9HLQ1lmmyi1wPVxpXhw/5FP07hvUZeQjbkRRS+4eQQ6ZaPzpSUYGK3IH8FXthp clLs7WO3Zt6ZdlyB0wIM7Rlt1MKdBaE= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Eric Biggers Cc: syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com, Andrew Morton Subject: Re: [syzbot] WARNING in register_shrinker_prepared Message-ID: References: <000000000000db448c05e0caa5ba@google.com> <20220606122302.dc265509ca896073e98049a3@linux-foundation.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 06, 2022 at 02:34:36PM -0700, Eric Biggers wrote: > On Mon, Jun 06, 2022 at 12:23:02PM -0700, Andrew Morton wrote: > > (cc Roman) > > > > On Mon, 06 Jun 2022 10:17:34 -0700 syzbot wrote: > > > > > Hello, > > > > > > syzbot found the following issue on: > > > > > > HEAD commit: 1cfd968b58a1 Add linux-next specific files for 20220603 > > > git tree: linux-next > > > console+strace: https://syzkaller.appspot.com/x/log.txt?x=12f7b6b3f00000 > > > kernel config: https://syzkaller.appspot.com/x/.config?x=7da8386e3742814f > > > dashboard link: https://syzkaller.appspot.com/bug?extid=300d27c79fe6d4cbcc39 > > > compiler: gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2 > > > syz repro: https://syzkaller.appspot.com/x/repro.syz?x=103e5177f00000 > > > C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13545057f00000 > > > > > > IMPORTANT: if you fix the issue, please add the following tag to the commit: > > > Reported-by: syzbot+300d27c79fe6d4cbcc39@syzkaller.appspotmail.com > > > > > > loop0: detected capacity change from 0 to 20 > > > ------------[ cut here ]------------ > > > WARNING: CPU: 0 PID: 3694 at mm/vmscan.c:681 register_shrinker_prepared+0x119/0x150 mm/vmscan.c:681 > > > > That's > > > > WARN_ON_ONCE(shrinker_debugfs_add(shrinker)); > > > > I assume that debugfs_create_dir() failed. Please see the NOTE: in > > that function's kerneldoc. > > > > The call to ida_alloc() can fail too. > > register_shrinker_prepared() is not allowed to fail; anything that can fail must > happen in prealloc_shrinker(). So either this new debugfs registration code > needs to be moved to prealloc_shrinker(), or errors from it need to be ignored > (which might be appropriate since it is just debugfs). I don't think we want to panic or fail to mount filesystems because of it, so I agree, ignoring is the best option.