Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2641323lqp; Mon, 25 Mar 2024 05:26:38 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWX39NJzV/t8wM8ZePDB5Is+wit9cqqfIzOZxkmLUhuLDSCBQTsJm4Pxlvk2kr5fDJkAFguTZVIfmgoFQIAGRTWRvd93IsIUHDCDuCqPQ== X-Google-Smtp-Source: AGHT+IHmPSmVqbZAdopaCXzigT1MclC1nr8bi4gkcuAvJkp03Oyszj2hTbYykgCl09sffcoWmow6 X-Received: by 2002:a50:9f2b:0:b0:56c:169c:6b38 with SMTP id b40-20020a509f2b000000b0056c169c6b38mr1156084edf.10.1711369598555; Mon, 25 Mar 2024 05:26:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711369598; cv=pass; d=google.com; s=arc-20160816; b=YHkRNxHdd+0A/ymtk9egEi1Euxhq0eFi20K+dNk3x+PgusZ6cU1w9cARJtenyAfOnE +iZ3ySdMZ+PNou/KEa+K6WF7FWj7wVeArGgM0EUgBDw0+69jFTp2c5FdHjEe9mkpgeCz XXK3W4qBZDlP5opVc9Eu1coOh4xNb9ClpuEq/+TopjxL4mBiVMoorTInKr9+xgmuaJNy j1vFv3qtDkegjT/KYHEYhoSFlCVNMNp4IQjp9RapdSNqTFqauK7Au4LTFWudaPBl7oBS 8dLTA9vAqXTQxndTxGYITky57qtrWelMsQqsEErzNWn4Rm+vV2ax5jhqkwIlPuEJYoZg mf6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :cc:references:to:subject; bh=M9xh50bxftX/1cq/cdNcLDv2owfKHA5WZMUgvhsX/X0=; fh=K8JT+L0mUiRAhS5y785R0Up/q2ZvLRLKKn727F28Nvc=; b=dE4wbzOb8IMHrV6Kul/CZmCTosn8vxzfk2DcpXY8L0ZfSZj02QL6GPRcgC8U4KbEAV FXMpuV2JCyHaQALUWOpgAKnupRO543BxCYNAV+kLcu+460e6Y+G2gf/GtjzflUc0Qpai QyGfnT5M+mii/xSsfOyj2ApjUuVDcSJWpuNUbukE6NBwQclb3N3JmmV3HlJnCbshwTlo vUkMiX46/xEWTWiewbvZr3fy/JcZm9UXtbGi0uORnTenVydL7+bS9EdXaPxqov3JneqZ BjGvYutrD6dD83pd52zbfq+ujxOQDqjnJy3zhbCXiKOA1cQQRp/4QDGfdr+tWgylvcJN uaAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-116459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dd19-20020a056402313300b0056bdd1184edsi2404153edb.483.2024.03.25.05.26.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 05:26:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huawei.com dmarc=pass fromdomain=huawei.com); spf=pass (google.com: domain of linux-kernel+bounces-116459-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com 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 4A7621F387E3 for ; Mon, 25 Mar 2024 12:26:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F2B815EFBE; Mon, 25 Mar 2024 07:31:47 +0000 (UTC) Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (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 49B55184322; Mon, 25 Mar 2024 03:36:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711337815; cv=none; b=ZeEbhrSB2Of45wZ+qZm7sA6gjMOMiub9UIh0kplosLpg/rEFJqQslPf3KxXV0zqZtZbltQwkkjGTg59p1wz7NxF+u2q2qXlvZIyR9tLBiePi50tgg0/qhBWNiZnl+5I0cvo9MpdfJ5BcfdoiBV95Nrt85K1mnOUsuxjWOIvo4Ug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711337815; c=relaxed/simple; bh=4lL5XnMf7GNTkV3kYDbLRsz5MXFmRO+PFX0TJ+76mGg=; h=Subject:To:References:CC:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=U+ge3BOIP2afoy0/rd/dw/sF+ReGya2AYNsN5MsCOTvoedJQwM6KWHFyRFXjlPZ+5TDByXOtmdzpiSUHPh/W6hRTZzzweQ2IwENQKmAXtvSjlFZOU242sDjUwmVRbjiD9fvvY9XTKtwJ2vWyluiTd07in+KRIh39ZD7kTZ1ezfk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4V2z7S5nsKz1h3fw; Mon, 25 Mar 2024 11:34:12 +0800 (CST) Received: from dggpemd200004.china.huawei.com (unknown [7.185.36.141]) by mail.maildlp.com (Postfix) with ESMTPS id 2A3421A016C; Mon, 25 Mar 2024 11:36:50 +0800 (CST) Received: from [10.174.179.24] (10.174.179.24) by dggpemd200004.china.huawei.com (7.185.36.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Mon, 25 Mar 2024 11:36:49 +0800 Subject: Re: [PATCH stable-5.10] mm/memory-failure: fix an incorrect use of tail pages To: Matthew Wilcox , , Greg Kroah-Hartman References: <20240307124841.2838010-1-liushixin2@huawei.com> CC: Andrew Morton , Sasha Levin , Dan Williams , Naoya Horiguchi , , From: Liu Shixin Message-ID: <026db58d-feea-8191-616a-3e6dca592786@huawei.com> Date: Mon, 25 Mar 2024 11:36:49 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240307124841.2838010-1-liushixin2@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemd200004.china.huawei.com (7.185.36.141) Hi, After backport commit c79c5a0a00a9 ("mm/memory-failure: check the mapcount of the precise page"), I got an error message as written on the patch. The problem can be fixed by the patch or just revert. Now I prefer to revert because I think it is related to folio and no impact in stable, or maybe I'm wrong. Thanks, On 2024/3/7 20:48, Liu Shixin wrote: > When backport commit c79c5a0a00a9 to 5.10-stable, there is a mistake change. > The head page instead of tail page should be passed to try_to_unmap(), > otherwise unmap will failed as follows. > > Memory failure: 0x121c10: failed to unmap page (mapcount=1) > Memory failure: 0x121c10: recovery action for unmapping failed page: Ignored > > Fixes: 70168fdc743b ("mm/memory-failure: check the mapcount of the precise page") > Signed-off-by: Liu Shixin > --- > mm/memory-failure.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mm/memory-failure.c b/mm/memory-failure.c > index f320ff02cc19..dba2936292cf 100644 > --- a/mm/memory-failure.c > +++ b/mm/memory-failure.c > @@ -1075,7 +1075,7 @@ static bool hwpoison_user_mappings(struct page *p, unsigned long pfn, > unmap_success = false; > } > } else { > - unmap_success = try_to_unmap(p, ttu); > + unmap_success = try_to_unmap(hpage, ttu); > } > } > if (!unmap_success)