From patchwork Thu May 11 13:47:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuo Handa X-Patchwork-Id: 13237974 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 D09F9C7EE22 for ; Thu, 11 May 2023 13:49:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3BFB66B007E; Thu, 11 May 2023 09:49:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 36F2A6B0080; Thu, 11 May 2023 09:49:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2376F6B0081; Thu, 11 May 2023 09:49:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 149066B007E for ; Thu, 11 May 2023 09:49:11 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 35AB580C7E for ; Thu, 11 May 2023 13:49:10 +0000 (UTC) X-FDA: 80778105660.12.24066A8 Received: from www262.sakura.ne.jp (www262.sakura.ne.jp [202.181.97.72]) by imf28.hostedemail.com (Postfix) with ESMTP id AB476C016F for ; Thu, 11 May 2023 13:47:53 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=none; spf=none (imf28.hostedemail.com: domain of penguin-kernel@I-love.SAKURA.ne.jp has no SPF policy when checking 202.181.97.72) smtp.mailfrom=penguin-kernel@I-love.SAKURA.ne.jp; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683812876; a=rsa-sha256; cv=none; b=UVPIhi0OsnHT7h+YLxtJpmTpe5KePAn6XgP1DOz79VW1oFkJ50fx3tR1AdZ4wU6Fq0+WSc hj3Yjc1W6IUZLVzB5UoEnJLsleyHM5QYBb5ErmAEes8nsECKamD03eVdJtkoXAOB7JFdAJ 9T7hUiSvPx348bB5Sc9p6hTEyj49BcQ= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=none; spf=none (imf28.hostedemail.com: domain of penguin-kernel@I-love.SAKURA.ne.jp has no SPF policy when checking 202.181.97.72) smtp.mailfrom=penguin-kernel@I-love.SAKURA.ne.jp; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1683812876; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=thFHDWJFLEmFwCt82IEIjUpsOFAk82rYipfIfITty0o=; b=S2cVb7mbZ/wcgIezGvHDg1Xg040jtJUiFfHto0KmMaU/X9nBEcN40wXxyJ2b0tNMYAbvxT d118udC4Us75sWWjJht2pa27HjomuK5dfk7JoBw0uFW/VZkdxT+KMJr/+8FgO38JG01xHa lBYx/mzy+tP34hT6D58ClttFlznZyUo= Received: from fsav113.sakura.ne.jp (fsav113.sakura.ne.jp [27.133.134.240]) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTP id 34BDlZn2062221; Thu, 11 May 2023 22:47:35 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Received: from www262.sakura.ne.jp (202.181.97.72) by fsav113.sakura.ne.jp (F-Secure/fsigk_smtp/550/fsav113.sakura.ne.jp); Thu, 11 May 2023 22:47:35 +0900 (JST) X-Virus-Status: clean(F-Secure/fsigk_smtp/550/fsav113.sakura.ne.jp) Received: from [192.168.1.6] (M106072142033.v4.enabler.ne.jp [106.72.142.33]) (authenticated bits=0) by www262.sakura.ne.jp (8.15.2/8.15.2) with ESMTPSA id 34BDlZsn062218 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NO); Thu, 11 May 2023 22:47:35 +0900 (JST) (envelope-from penguin-kernel@I-love.SAKURA.ne.jp) Message-ID: <6577e1fa-b6ee-f2be-2414-a2b51b1c5e30@I-love.SAKURA.ne.jp> Date: Thu, 11 May 2023 22:47:32 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: [PATCH] debugobject: don't wake up kswapd from fill_pool() Content-Language: en-US To: syzbot , syzkaller-bugs@googlegroups.com, Ingo Molnar , Thomas Gleixner , Andrew Morton References: <000000000000008ddb05fb5e2576@google.com> Cc: linux-kernel@vger.kernel.org, linux-mm From: Tetsuo Handa In-Reply-To: <000000000000008ddb05fb5e2576@google.com> X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: AB476C016F X-Stat-Signature: 65hhu83q6qw9pn4q5obygowu84hggmri X-HE-Tag: 1683812873-33608 X-HE-Meta: U2FsdGVkX181E0/4SOasYERwvmjoYh6b6Dd3guA3AyK23G6rWSXxp9pzajK+R3uUdSuT7kf/aawp7UgkpbLxTGYZ+twyiyOJXVHRjYZbyTMC8sWNjblViXOeo3DzMTU/VfJxjahzmbfIJ69JyQ+bcl3QeA8Q29EckHhnLXP3A/PXSOuwcJP/7z17HPLBy86LOQZQXkBaHzZWbPsHo8pV4+H2tvJJEGjdobZdOX8Yoot2dNZmpRm2o5JdSfB6EegJozIdbujVeiaPQArYLZruuBHzYPN5SNBzV3G2yhC1hYEF+LReXHMer+ZtDXFCSnyrJ9F/M0UVi/n6S1h4VwCzgn3KYq10HnAqacXR/6eFqjxdcdQo/j9gzQl4SvE6p8zOu7w0mEZys0m4xaTi0e7gr7pGwzezt2BGy160BMGHTy+sIHqD6UwSBme/z87cf66W5k1h8p3U1d8/wW31lhlVZhu4mC6Z4lvQPtYjGQtX+bmTBfNHl6DaOG8PpT9lK0BScUITNopnJhAu8XircIJ27HBdG/6odQyv78MNy0z+KRCd5IbrlZ61nslWPltuuiEib6bG3fSzC/68Q/PVhoc7LRDZQfCWFxCpAbu2X7YidNv123TVuwHa95sBPdpQvGyQfoZ6fHGWb7VG9WBgl8ZFSH/OvyR10Xhyt4ashHCXx+84q9+B80rC6Do8JTXylJbRMa0pdt1+gUZS9eRiANkQOwSmlBm7xJzX7vu7PBW//qdePdbaoJ35gS64cZ+W+L6xkamiVlgDwIMrMn+eWYeygyEpiEDUEoxIlbWhhf+7Nymwxuzn8q5up67F2hQZLcjDrIi2cdJvaovXmh9iyZdLX6yfPU1T0w+8xL5yPRSVo9MbQAR9lGz0Iz+M3krDfQjhbFs5Dx2jfsJG2dK/WTnxaCARU0BoB91WWE5HvFpWFxvwm+AjLHCCaT9W1y4/TFh8sO8tmHlVobyNXG2GS4m /5y1xwGT nnjjRLJJljx3nVe1JuI9yV5KTAQQLqaZhs1dJC0jD2DVVExeEjhw3sNarhtyfgzEhPfp7LQzwvpghCd9aqNHVQ5TpCKe3cggP/4VxqYU6Bp2Udi0ji9BfHj0CrkjiPtwhjxKhg8bQzQ455Z8RKKRtowlJcP4muC6Lcpbf+Cfeq7gweem1hMePXk5xNTvdIqBXWd0bJL2PndeVKGc8hkKcAJ5noHo/QOBak54eYGbnhdkvzIu1PJfmSSF/GhR8KZUV0QhEMrMTmu0iHeABFiNq7BhYl00mp0TpSU0jfOxrxzLLPxbEzZlElycOdgLkqhyEJ20rJnst14Y5hY5uCOH48XZMGBho8KP012IvZ5y9GQqv8mjJIjAz6g+2xdmmgzjdqcHHzY6Hzt80sJVhj4xconj6rwQcCNkV1/sZbfBwMkoF8VNAxmzOi6H67q+yvRawlIORO5gYYq1UPHypSEplE5stg6ykMjwO4sX7 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: syzbot is reporting lockdep warning in fill_pool(), for GFP_ATOMIC is (__GFP_HIGH | __GFP_KSWAPD_RECLAIM) which wakes up kswapd. Since fill_pool() might be called with arbitrary locks held, fill_pool() should not assume that holding pgdat->kswapd_wait is safe. Also, __GFP_NORETRY is pointless for !__GFP_DIRECT_RECLAIM allocation. Reported-by: syzbot Closes: https://syzkaller.appspot.com/bug?extid=fe0c72f0ccbb93786380 Signed-off-by: Tetsuo Handa Fixes: 3ac7fe5a4aab ("infrastructure to debug (dynamic) objects") --- lib/debugobjects.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/debugobjects.c b/lib/debugobjects.c index 003edc5ebd67..986adca357b4 100644 --- a/lib/debugobjects.c +++ b/lib/debugobjects.c @@ -126,7 +126,7 @@ static const char *obj_states[ODEBUG_STATE_MAX] = { static void fill_pool(void) { - gfp_t gfp = GFP_ATOMIC | __GFP_NORETRY | __GFP_NOWARN; + gfp_t gfp = __GFP_HIGH | __GFP_NOWARN; struct debug_obj *obj; unsigned long flags;