From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D84A0C433EF for ; Mon, 6 Jun 2022 21:34:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 65DB86B0072; Mon, 6 Jun 2022 17:34:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 60B9B6B0073; Mon, 6 Jun 2022 17:34:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D2406B0075; Mon, 6 Jun 2022 17:34:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 3F2616B0072 for ; Mon, 6 Jun 2022 17:34:41 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 1062620B80 for ; Mon, 6 Jun 2022 21:34:41 +0000 (UTC) X-FDA: 79549115562.04.5154A85 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf11.hostedemail.com (Postfix) with ESMTP id 80ABF40003 for ; Mon, 6 Jun 2022 21:34:31 +0000 (UTC) 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 691E96165A; 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-Stat-Signature: 69ifzgqpezp97stk8ch75ub83yyae1dq X-Rspam-User: Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ujiPq0WM; spf=pass (imf11.hostedemail.com: domain of ebiggers@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=ebiggers@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 80ABF40003 X-HE-Tag: 1654551271-176231 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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