From patchwork Wed Apr 17 21:18:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 13633849 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 0298CC4345F for ; Wed, 17 Apr 2024 21:18:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 908096B0093; Wed, 17 Apr 2024 17:18:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B9606B0095; Wed, 17 Apr 2024 17:18:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 758846B0098; Wed, 17 Apr 2024 17:18:46 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5796D6B0093 for ; Wed, 17 Apr 2024 17:18:46 -0400 (EDT) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id E6FA21A0FC7 for ; Wed, 17 Apr 2024 21:18:45 +0000 (UTC) X-FDA: 82020288210.20.6A36264 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf13.hostedemail.com (Postfix) with ESMTP id 58D522001A for ; Wed, 17 Apr 2024 21:18:42 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DRK12lWt; spf=pass (imf13.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713388724; 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:dkim-signature; bh=vaZSbjr/Big1ZTWFV5V3ewRiOJHQfxaJnQPHMzFI5qg=; b=w8CPn3AcyrJzKGJr2+2B9c2XmtUow24LvE9szSzb1mlhby5eRvm4qk8GBNedkrcJquT0l3 l+ezyia2BKJF31PeqdX7Ql677wfscjKanFS21pSlKz51v60WDr/IitdONW8fd75tbYmGSY LypqGIjiDtOT5fVhxo8rhcFTyEge+6I= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=DRK12lWt; spf=pass (imf13.hostedemail.com: domain of peterx@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=peterx@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713388724; a=rsa-sha256; cv=none; b=3CtP7tFj2vRzxeRD6TAZwuCUJVB4NbvdcWqwjq8M52DV+iW0ceQ9mezKaDzcW/J0XnaSGb sqPiWaJdVOwI3ZOSrl8GcQ9YyKGcZJ0Jfzb+Rn1RdzchepX9Kc0R+ot51DU2itjiuuhuhK D12R26yQu4jsYEh/9c3yqJL7XnURETE= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1713388721; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vaZSbjr/Big1ZTWFV5V3ewRiOJHQfxaJnQPHMzFI5qg=; b=DRK12lWt1z9icAMqhNsiXpMvpqk1bB7yiA2Zvuq6Y5TWC0SkKEmiFVyC6K/i0vRn9Q/2fu cxvKJocEbosep0OCT68GoK8DhqZV/3MNUOg5kdgei104uWpuykBjPDSJqwZ2A0EynuSMtR Dm1zjj0nITxH7cFlYSrjWNdPHPf/4rI= Received: from mail-oo1-f69.google.com (mail-oo1-f69.google.com [209.85.161.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-190-8dfBwJdWOguo06mFMIzdtA-1; Wed, 17 Apr 2024 17:18:40 -0400 X-MC-Unique: 8dfBwJdWOguo06mFMIzdtA-1 Received: by mail-oo1-f69.google.com with SMTP id 006d021491bc7-5acdbfb49dbso41385eaf.2 for ; Wed, 17 Apr 2024 14:18:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713388719; x=1713993519; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vaZSbjr/Big1ZTWFV5V3ewRiOJHQfxaJnQPHMzFI5qg=; b=hOZTay+DIA7RP+KiFnnr1y+uWhHWk7NJT9Uj01jksyfge7UxVZoJ6dLaf1EU2t/F2U 6TwI+jSlISOZKYizl7yg7DxDEEIw0JijbiBU5X131F7d9u+0Bl1kwRY7T/j/bLbDOXmb 5XDeXKGY90xU1tKegniycixyEt88U4tJ+wcdmljEi2a6UiZx3gBtK8bgQz1Jtq6Hjiqr JVivoX8dr6WQX2ZPpuJlD3SMbhXS4RTz07u+hZsoEU6O0Lzgv41mDNu+sJN+VaSdQrdR 4bs8A8qa0HrIt7d4fcObw+7lOz1mgVf99wnyLIHj+VeMiHCjJ623G2/RBwF/PWtqaa+F PzXg== X-Gm-Message-State: AOJu0YwTVWam3ohQAaVV7Y4RAauIyQWDoyT8zKdKY3xRJtJOqT/2vgQy Y0JOZmMEdw0hwNo/Sigx8HscaU+lvc+4Gr3Fd57dAoLs26NV8+aUZO8Nhj6bj9IfiGtb7LYW4OT NV0fwlKWMhrjjr7DBlrB5y3EjnVQndV7kOUufd6OKfN4UsgdGbzUp9pUmMvUCmtiGQ1+dS94ZBT h2eJ9d59al6kM479KBk0OkuBHj2aKz6A== X-Received: by 2002:a05:6358:5903:b0:189:a9fa:f512 with SMTP id g3-20020a056358590300b00189a9faf512mr791818rwf.0.1713388719406; Wed, 17 Apr 2024 14:18:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkJAo39kjQ/eDy9sVg3usabpSgplaT/SVidXPJ26Le9qlIHvGQ4T7UGdRB3oGfYwJTy6M4JQ== X-Received: by 2002:a05:6358:5903:b0:189:a9fa:f512 with SMTP id g3-20020a056358590300b00189a9faf512mr791783rwf.0.1713388718852; Wed, 17 Apr 2024 14:18:38 -0700 (PDT) Received: from x1n.redhat.com (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id c10-20020a37e10a000000b0078d667d1085sm18692qkm.84.2024.04.17.14.18.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 14:18:38 -0700 (PDT) From: Peter Xu To: linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: peterx@redhat.com, David Hildenbrand , Mina Almasry , Andrew Morton , Muchun Song , David Rientjes Subject: [PATCH 1/3] fixup! mm: always initialise folio->_deferred_list Date: Wed, 17 Apr 2024 17:18:34 -0400 Message-ID: <20240417211836.2742593-2-peterx@redhat.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240417211836.2742593-1-peterx@redhat.com> References: <20240417211836.2742593-1-peterx@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Stat-Signature: 4tfkfhtp63x73nnpn4yn8ck359zajour X-Rspamd-Queue-Id: 58D522001A X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1713388722-854299 X-HE-Meta: U2FsdGVkX1/BpruIq+MwHpiRpnYm+taUSEPM5GL0Q1Ho/K+mdYA8SWpQnJpDn32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d/nP91X6e1pgar4q+tW+5qcLGsswVXEK5kSvwoMA== 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: List-Subscribe: List-Unsubscribe: Current mm-unstable will hit this when running test_hugetlb_memcg. This fixes the crash for me. Signed-off-by: Peter Xu --- mm/memcontrol.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 1840ba4c355d..7703ced535a3 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -7529,6 +7529,7 @@ static void uncharge_folio(struct folio *folio, struct uncharge_gather *ug) VM_BUG_ON_FOLIO(folio_test_lru(folio), folio); VM_BUG_ON_FOLIO(folio_order(folio) > 1 && + !folio_test_hugetlb(folio) && !list_empty(&folio->_deferred_list), folio); /*