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 92481C433EF for ; Mon, 6 Jun 2022 23:29:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E235C6B0072; Mon, 6 Jun 2022 19:29:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DD3CB6B0073; Mon, 6 Jun 2022 19:29:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C9A986B0074; Mon, 6 Jun 2022 19:29:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B51806B0072 for ; Mon, 6 Jun 2022 19:29:27 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 847223528B for ; Mon, 6 Jun 2022 23:29:27 +0000 (UTC) X-FDA: 79549404774.24.552166D Received: from out0.migadu.com (out0.migadu.com [94.23.1.103]) by imf10.hostedemail.com (Postfix) with ESMTP id 9B3A3C0029 for ; Mon, 6 Jun 2022 23:28:37 +0000 (UTC) Date: Mon, 6 Jun 2022 16:29:19 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1654558164; 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=MPd50RzBLQnNTDWq5I+8g4Pd+wy9MD7JQRJ8I1ChLEo=; b=hnk3yVbnmAnqrLvGXZCNRVup8nEcZBoUUZ75WLie78mhcJdNheAzU8yCgx3vrtmcmrGwoQ GLi1/Iz/xZtbzmYHhnBct0XsEIIHIL4EUHdg5n7juir0+B9QXHDRxUt0ql/sz7d2MuwqK8 QKJ+jwMeCUeCIU1YLwSllf6AA6fudLk= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Andrew Morton Cc: syzbot , linux-kernel@vger.kernel.org, linux-mm@kvack.org, syzkaller-bugs@googlegroups.com 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-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Stat-Signature: sdy5fgyjued9mftgxi3w18e1kw458kfj X-Rspam-User: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=hnk3yVbn; dmarc=pass (policy=none) header.from=linux.dev; spf=pass (imf10.hostedemail.com: domain of roman.gushchin@linux.dev designates 94.23.1.103 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 9B3A3C0029 X-HE-Tag: 1654558117-194958 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. I agree and we really need to just ignore it. If it happens because shrinker_debugfs is not initialized yet, there will be a second chance. Otherwise we can't do much anyway. Thank you! -- diff --git a/mm/vmscan.c b/mm/vmscan.c index fd8a472b6501..ab885561d3e5 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -682,7 +682,7 @@ void register_shrinker_prepared(struct shrinker *shrinker) down_write(&shrinker_rwsem); list_add_tail(&shrinker->list, &shrinker_list); shrinker->flags |= SHRINKER_REGISTERED; - WARN_ON_ONCE(shrinker_debugfs_add(shrinker)); + shrinker_debugfs_add(shrinker); up_write(&shrinker_rwsem); }