Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp238819lqt; Thu, 18 Apr 2024 13:38:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWMZ72r9vz68A0SfPy70D7DQB6cSpDh74OkTGjdvsiPTfdAmnDCUZLk/HsphPtqjH0M0+XVVlzqygaQu+lZx8AtYDnAx4Acd7ufbjyJSw== X-Google-Smtp-Source: AGHT+IF7XUQAOArRh3TrJ+9fYaCIJqbSltTmFosfKUgQnFF/Zv6KoEBWLQrzJ6PiF1yoLVQuvJcj X-Received: by 2002:a2e:9dd7:0:b0:2d4:676b:f591 with SMTP id x23-20020a2e9dd7000000b002d4676bf591mr59134ljj.45.1713472719485; Thu, 18 Apr 2024 13:38:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713472719; cv=pass; d=google.com; s=arc-20160816; b=En31guSrIWrzCXX52QhHku5enmKMfCDBLSyjEXpKtCEOW29XsykPGDQ4gL56rcMMpS AlBBO0VY1xyzJNZGCd9uzRLBhn8VpdLBhURLXOcx5VoQ5V4492LKvO9YRzFke1Oqp8Iv OFH+nq33qH1E8KKhYiVzv5QfiF0xUR3DI9AmVCdYfWYYoi9qCcgpHeyyvl/Aa9k7+p7U Og2WwI5TJ6r4qXLIRkkvc7a6Ro1rbouTTmNnRt8+LIPeqXlF+HMo7KNqhLbwv4KBlhAK uffJQzotHmHedhLB68wJADgonBLN8LRYGt//5qo3bobQ8uXAABvKutz7DQxGyXnM3B1t yVQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=kMovb/Ih/EI9+xtX6d+G9C0oNEZ3/3pIEDK/vSbSizM=; fh=xX65QT6/TQ/Dp09LSypGxBQytKNdZ5ZPAhdkhjoJWAY=; b=BL7UV0p1kHy0FnIjGt2VC8sFJ43ZSsgsIltxFQrJ3s7WmNeXqSesZC2NzHuCvjzawH c6dxphgT7lpjh+XMckmMefkFOgcaUxFl42FQAaOJiVLl3kxscjHDVKCgVLYZwfbTaa/H DseLM6YFF8jIj/Jspn95Akmg+0kLdIVi2VHM7eG0/HNCU6vq2UO3Cd705frPKJkJsHxf ghysve3mNWyUjNy++1RY8EMBwECGMwWjHZyu6QEdO3ieNRcjGBVfjFjHMiu2VPvSYGKp oM2MKRVkJZVbfQ0ij4haJCP5W1BqW/j1gAlxXCdbaqfq2JdGfXRVw0RfF5gOcM0NT7JG Gvpg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HE17W2pX; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-150752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150752-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id bx9-20020a0564020b4900b00568d18ba5bbsi1239023edb.191.2024.04.18.13.38.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 13:38:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=korg header.b=HE17W2pX; arc=pass (i=1 dkim=pass dkdomain=linux-foundation.org); spf=pass (google.com: domain of linux-kernel+bounces-150752-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150752-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 341BD1F21A96 for ; Thu, 18 Apr 2024 20:38:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A989194C72; Thu, 18 Apr 2024 20:38:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="HE17W2pX" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 868CC184135 for ; Thu, 18 Apr 2024 20:38:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472698; cv=none; b=NYxJK/Gokc13jkc75MZHO3d7OozQ0IxMYX9FQ02IwHjqAqSJAtc2FPt9yETSjid5QsT6rtbU3RABmvNdb9mHr8Z9R0+2kS5vSvwSybjuwD34vwHkgFCzlrIZ/XRmkVImlbedNEMkSrpJlsEeyhobEGi4TjlXBBJOD6y8O6w9xE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713472698; c=relaxed/simple; bh=w5RGyzVBvoGAtMUsTnU34Y0CJu5FBsbDHlJjmWZiX9w=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=KVucJTIzo3HhLpHGNTyTNayxCl9uuWdy57oifMCl2WK/ybhzfEuFiKYoiI1vyqNE3YEU5UsDkircoDI1+kFBDuAkB0FyZqvDOdUDrV/VYDG8RWM+YEvyT7aOkN6rrLXUh+M2/NlVZ/FpHa3fSTbORZQOg07Nn6iR7N9UdimPDK8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=HE17W2pX; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 161D2C113CC; Thu, 18 Apr 2024 20:38:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1713472698; bh=w5RGyzVBvoGAtMUsTnU34Y0CJu5FBsbDHlJjmWZiX9w=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=HE17W2pXfryr1qP1csdJB5HMM6g/LCw0KRag6Rbrltd2xCWWYPBEjPp9b0p5aMxMO 6oP2ODaoNH3oXamowSKFFW5G+RFn+/+SA7bbm7KGWyNYHgx42d/6H4q9hm+OKWgRTc 67MKC0gHKcvMwEMXEjosllHUn9GWgZ9uOtKiEQmo= Date: Thu, 18 Apr 2024 13:38:17 -0700 From: Andrew Morton To: Miaohe Lin Cc: , , , , , Subject: Re: [PATCH 2/2] mm/hugetlb: fix unable to handle page fault for address dead000000000108 Message-Id: <20240418133817.afb65c8dcd11cfea7c686d25@linux-foundation.org> In-Reply-To: <20240418022000.3524229-3-linmiaohe@huawei.com> References: <20240418022000.3524229-1-linmiaohe@huawei.com> <20240418022000.3524229-3-linmiaohe@huawei.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 18 Apr 2024 10:20:00 +0800 Miaohe Lin wrote: > Below panic occurs when I did memory failure test: > > BUG: unable to handle page fault for address: dead000000000108 > > ... > > The root cause is that list_del() is used to remove folio from list when > dissolve_free_hugetlb_folio(). But list_move() might be used to reenqueue > hugetlb folio when free_huge_folio() leading to above panic. Fix this > issue by using list_del_init() to remove folio. > > ... > > --- a/mm/hugetlb.c > +++ b/mm/hugetlb.c > @@ -1642,7 +1642,7 @@ static void __remove_hugetlb_folio(struct hstate *h, struct folio *folio, > if (hstate_is_gigantic(h) && !gigantic_page_runtime_supported()) > return; > > - list_del(&folio->lru); > + list_del_init(&folio->lru); > > if (folio_test_hugetlb_freed(folio)) { > h->free_huge_pages--; We should cc:stable and find a Fixes:. This appears to predate 6eb4e88a6d27022ea8aff424d47a0a5dfc9fcb34, after which I got lost.