Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1060427iof; Mon, 6 Jun 2022 19:31:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJww3DCZzY5U9H8tT2XSeJ08Acx/TPFw7c81Wb0A346WsBN/lvgf591Ckt+tIiJg81x02get X-Received: by 2002:aa7:d052:0:b0:42d:d114:43f7 with SMTP id n18-20020aa7d052000000b0042dd11443f7mr29951261edo.320.1654569062626; Mon, 06 Jun 2022 19:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654569062; cv=none; d=google.com; s=arc-20160816; b=QroxsLrXsmQHxm1Q1QKTgXnlJwNRDAaL7Flc4oSMo3tIgyTtre8XVBzT7HKppwmtdb 5joM7kufBv7odIqX04E5xunpWNsD7fXMuRxXCTpCIzRyKzkP8eg3Dj1nnbdBxmsTFAlc gher9jgEcvKsPKQDb8USb3M+1erVuVg6eIHyQ/VqNnL9NvjJSH8lppVdrVMxxf8eQI44 T4dVbmp7xR7TvtSmM0EGXPi2vz0muA3aLdxKlb9sUTIumYhMAZpMKF2h0oI0zN9knSbh T1wVUe7+wtaVJ7qqoOb4veI9rGwnCoEISZbs+JgOtJKi8v08diWEEGLJyLLi9/L5PLig oWCA== 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:date:dkim-signature; bh=vNJRWNSQHXoOefTBNcjpRM6Hr/3Wa92+K32oh05l6E0=; b=RAXrjSI2S4o+dvESv7b9NjVut+uzKFTNbWvIPurhGg3XEAKnQbT9ROJDJ9yBqdQNsx K66PG+8BbxWUnBJAlY0Uieae/13s6G1cVASSxFX0F1JT/IQe7ROSFXeBERaYgoCx8418 m3s913F+quBjOYLoJaK3P9QfX3uT9LBEIaryhVGs6Emzydb+Atox/IdFewbKdAYibZcV ghrJeS5YsnoxcfbcIJmc+Yh36OYumhXeyLEhgee0+nJ0WcExNPdFwiH8PI642YtQkbqm xwHkl0mAqF7sL+M6STY8tGdA8j0kVf6eCKyVHKllchUpK8ukBHuhVmW91vGy4P4sHBfA RMrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ujiPq0WM; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y15-20020a056402270f00b004313584a817si1044712edd.611.2022.06.06.19.30.36; Mon, 06 Jun 2022 19:31:02 -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=@kernel.org header.s=k20201202 header.b=ujiPq0WM; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235001AbiFFVem (ORCPT + 99 others); Mon, 6 Jun 2022 17:34:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234963AbiFFVek (ORCPT ); Mon, 6 Jun 2022 17:34:40 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CD2AC63514 for ; Mon, 6 Jun 2022 14:34:39 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 68FB961423 for ; Mon, 6 Jun 2022 21:34:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C892C385A9; Mon, 6 Jun 2022 21:34:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654551278; bh=4pZAYpwL1o6QGQv6UYh6ppBBuj4+Hz9W0scDPKxlZu0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ujiPq0WMDaHcR5ZNZQYFa2EerJsX79bn1BQ2COnT4RAmeTPbjqa1U/ELivqk1hB1B SGlbFJLW/+p6fslKRA6IHW4313Suf7R/iTGeaM+xKXWwtXkvahrPbSmqcXXARX4AuU o5wCwzoiC+wWgQNcraQ6yqjQ23eRA6Ug1rcSRAnDtTOBC8FJ7qoiM6/ow9I10lE4zG aLPDRigT5IRv9u/NCfEZjdLsL9zu2QoHmaQjbnH2E9rMZ+hSnO+cyPSBjgXeddcjmP P2fddzpiqAvvjEKdP8qlVgHnbvpe8PqI9LP4rI0QavO7bz8T43qJSBkwNbauKR1j7x vtzu1TJe3zoeA== Date: Mon, 6 Jun 2022 14:34:36 -0700 From: Eric Biggers To: Roman Gushchin 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: <20220606122302.dc265509ca896073e98049a3@linux-foundation.org> X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 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). - Eric