Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1826487rwl; Thu, 6 Apr 2023 01:34:48 -0700 (PDT) X-Google-Smtp-Source: AKy350Y+Ef4roH2TW/t+/KTV9UwKDb5LmxFKzi7AIzjKtYwveRpWxWfHKchsgBfIMnNwknKwZVjQ X-Received: by 2002:a17:906:3a5a:b0:932:6452:2396 with SMTP id a26-20020a1709063a5a00b0093264522396mr5563537ejf.74.1680770088539; Thu, 06 Apr 2023 01:34:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680770088; cv=none; d=google.com; s=arc-20160816; b=uFpE7EJLbdT+bbNfW52N2vj/LgOQpStVQfdR3thUSwbrbYEa5l/e4552diA5KiVkxE /XBeqm0yFZzUn+fUWmyP5tEn7lpc5Af39iWWzovGoqzFl3qnrfekcCULfmZoThCBgVXt 8XKnsCDnOvAPDVlvpQgZNJXBrW7LltMc6HfcqNfJ/xYB3jJlZu181CAB03Z1TaQg82S0 pB1MrPkA8KU3KNLJ+B/MJRIOJmitzAP7o3mv+5O1pPq3uOuOFagaj1x/potSzoxtDzfO wMJ0PtEDsLGWkFlE1sggUQMEjFj0YW1xWUCcu1KZq+d3N5s4pLhofr/hwpdRdlQY8x3m Z30A== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=UFsqLHECiaaZpUWd/R1g+L87eavPw4icy8tzwp+ivws=; b=JQqXqsY5rUqNCpc8dticLXTgmEL4z9JweOcorW64wprXuYa/ovCGYnVlLfSMgo+zNQ ZdVp41SyvVJdS8pQxx9AvQxB6WGEqu75ODooULcxrW6dXvZ15TEDz3L1NpJNNomLp0gE 900qBWO94046nTSoYKV1NeaWweQbWNdF66DiIlJek/njeb4QwjSmltrchUbmC45wWEAe A+isga1DmidnKOvw4QcBlz1u8dUmSnuSC/tXoa+9xGu9DVioPR76tYhT4mie94B9XyRn rlBgGegX2JVCMdWG4dCuR/1hTjn7qFZqjFJHTQS1YRoZ1+BJsm6T/36VrqvKzOf+37B6 VYpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=Qn0MScj3; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oy25-20020a170907105900b00931f38b1220si681629ejb.973.2023.04.06.01.34.22; Thu, 06 Apr 2023 01:34:48 -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.dev header.s=key1 header.b=Qn0MScj3; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236149AbjDFI3W (ORCPT + 99 others); Thu, 6 Apr 2023 04:29:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236019AbjDFI3U (ORCPT ); Thu, 6 Apr 2023 04:29:20 -0400 X-Greylist: delayed 523 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 06 Apr 2023 01:29:18 PDT Received: from out-49.mta1.migadu.com (out-49.mta1.migadu.com [IPv6:2001:41d0:203:375::31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E685E130 for ; Thu, 6 Apr 2023 01:29:18 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1680769233; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=UFsqLHECiaaZpUWd/R1g+L87eavPw4icy8tzwp+ivws=; b=Qn0MScj3Ee2BYVFqPVQ+cea8TMWj0zA5FdtSZ9gpPTlV5MwLSd93kH70ti9md/zUXKNDns 3DZx+Y26sQJscgVZPN0NygmL/3LueEXL1LYTgG9t5OWRo/LywTC7UDRM9O+Vx8FCzvc17u CFCziuqW4+tPLRyYVHFH7QuAX5dBwLg= From: Naoya Horiguchi To: Andrew Morton Cc: Yang Shi , Miaohe Lin , Xu Yu , Tetsuo Handa , Naoya Horiguchi , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] mm/huge_memory.c: warn with pr_warn_ratelimited instead of VM_WARN_ON_ONCE_FOLIO Date: Thu, 6 Apr 2023 17:20:04 +0900 Message-Id: <20230406082004.2185420-1-naoya.horiguchi@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 From: Naoya Horiguchi split_huge_page_to_list() WARNs when called for huge zero pages, which sounds to me too harsh because it does not imply a kernel bug, but just notifies the event to admins. On the other hand, this is considered as critical by syzkaller and makes its testing less efficient, which seems to me harmful. So replace the VM_WARN_ON_ONCE_FOLIO with pr_warn_ratelimited. Fixes: 478d134e9506 ("mm/huge_memory: do not overkill when splitting huge_zero_page") Reported-by: syzbot+07a218429c8d19b1fb25@syzkaller.appspotmail.com Link: https://lore.kernel.org/lkml/000000000000a6f34a05e6efcd01@google.com/ Signed-off-by: Naoya Horiguchi Cc: stable@vger.kernel.org --- mm/huge_memory.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 81a5689806af..06bcdd6f5060 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2649,9 +2649,10 @@ int split_huge_page_to_list(struct page *page, struct list_head *list) VM_BUG_ON_FOLIO(!folio_test_large(folio), folio); is_hzp = is_huge_zero_page(&folio->page); - VM_WARN_ON_ONCE_FOLIO(is_hzp, folio); - if (is_hzp) + if (is_hzp) { + pr_warn_ratelimited("Called split_huge_page for huge zero page\n"); return -EBUSY; + } if (folio_test_writeback(folio)) return -EBUSY; -- 2.25.1