Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9739071rwr; Thu, 11 May 2023 21:13:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7bBapXzQwW8jukB4Pf/p6B27d1b2iq+3kuGrZDmHl5XIKEzyEB7zPOyLKxIpi3ipI2YVYC X-Received: by 2002:a05:6a20:9192:b0:f3:2d33:de72 with SMTP id v18-20020a056a20919200b000f32d33de72mr29476995pzd.21.1683864796053; Thu, 11 May 2023 21:13:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683864796; cv=none; d=google.com; s=arc-20160816; b=Ub+liXHgVMaG7kTuB7XxZznVzPDyUj5Lix1rY1NxV8P1IzTs5KgylAljNE3a/ZKYkE lUg4BvALIRpt6RFdQBpzLf04hl1HBQuiT8AYN99xcRK/1l+qX+4PxJNy4hdSI26EfFMx 9D7VbDKhJlzWuQAzh4HwarDue9I0BLnIhokI/oeNTt4gxrJiACLHeNbR9nLkAtjwy935 /Wj/QEsPquEijwQNQB8UK6vp5W4ZEhWPLMwLLAJfNdYhotYOh9RtlpsWoqoxTDakbWum zi4TI/aGbyZavS17bIGyQHK78l1Eh1ZAXu08i2NPh62GCywd0VHEJHl5mIA73eez7++H x7BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=zpS355XOM7RluQVL1raMn0txycJLh4fsanFjdtY67ps=; b=SyFNZ2szHG3LZHd17iBOeo35kcQq7RfGR5ifARiN9L2EfvZHCkEgHGSXEWV38zgnaL nl4O/Syf4N+da2n3VvYI74Nqv33HMR3RR97lDkGRkiOcyW+Vf1lsAeKNTAuaM6vjGs1r gs3AieI+lJmOWd9CxN3Qq3LHtgVbmXS8pmYUGJUJK37r38l/kBpVjlrTaMwntB8xhg5A L/FXkYipNWavWq0ohuhzhsnVCW6WR64zQ0HcPT6/+0A0FBGi3MsmtZEJO3fnpYjb5+SB hfcZcA4GttsP5qDa21xZ9tI6dek3WLO/NWAWnV1+1K2aAxw/F8HLrAyYy2miYYx3oEUJ R7Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=NzFAgIx9; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i8-20020a639d08000000b0050faea11f35si9293994pgd.302.2023.05.11.21.13.01; Thu, 11 May 2023 21:13:16 -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-foundation.org header.s=korg header.b=NzFAgIx9; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239720AbjELDpD (ORCPT + 99 others); Thu, 11 May 2023 23:45:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239718AbjELDpB (ORCPT ); Thu, 11 May 2023 23:45:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A87644EC8 for ; Thu, 11 May 2023 20:45:00 -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 3BA0364EA4 for ; Fri, 12 May 2023 03:45:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E916C433EF; Fri, 12 May 2023 03:44:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1683863099; bh=10DaO0lGOkMyOmCE2RbgGjIgBZk/Z7vqVLApmhZ0NEQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NzFAgIx9MLyl86zLymF+9gdeksJokq03KCZB+W3c0/G5eT0prnoV+rJYABMx8GfIA sfu3G/VFzm8zI9tMacpB7Al8liEOax1d7TBpAdoStzy7itpLJg0WuSfOekpGO2oPhg exsWdDI7j04QVnlcwOHIX6TDTg7rk+O8T6Idj0/U= Date: Thu, 11 May 2023 20:44:58 -0700 From: Andrew Morton To: Tetsuo Handa Cc: syzbot , syzkaller-bugs@googlegroups.com, Ingo Molnar , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-mm Subject: Re: [PATCH] debugobject: don't wake up kswapd from fill_pool() Message-Id: <20230511204458.819f9009d2ef8b46cc163191@linux-foundation.org> In-Reply-To: <6577e1fa-b6ee-f2be-2414-a2b51b1c5e30@I-love.SAKURA.ne.jp> References: <000000000000008ddb05fb5e2576@google.com> <6577e1fa-b6ee-f2be-2414-a2b51b1c5e30@I-love.SAKURA.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Thu, 11 May 2023 22:47:32 +0900 Tetsuo Handa wrote: > 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. hm. But many GFP_ATOMIC allocation attempts are made with locks held. Why aren't all such callers buggy, by trying to wake kswapd with locks held? What's special about this one? > 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; Does this weaken fill_pool()'s allocation attempt more than necessary? We can still pass __GFP_HIGH?