Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp507865lqi; Thu, 7 Mar 2024 04:04:00 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXBLI5OIq7NpKLJL/ybDg0ODGgPirfVwMWPBP/7DdY/9CoSdyHFwiKWi+BRU68tveY9Zz8j1Cf9ycv0bV/ZTISFTDUXyYs9qpghLD+COQ== X-Google-Smtp-Source: AGHT+IG95hFzm1+Uwoz/Ji6OD5AIL4zdW64OpQq7trZJDFsp40gC+r9j+d29wfcs3o20pfePOQRI X-Received: by 2002:a50:9e4c:0:b0:566:d083:df68 with SMTP id z70-20020a509e4c000000b00566d083df68mr1045321ede.21.1709813040041; Thu, 07 Mar 2024 04:04:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709813040; cv=pass; d=google.com; s=arc-20160816; b=NlmepLndyiURqBrALUcFFc5eyRco7sM+S4TISb5XNEjm2kaQaEdrE4zu9vuTtcTdoh SnuewwW5juqOoyJPp8P8pU9bK8gFHRqrroIgZCgc83OOZGx4j3IsCkwXkPc7RpFfbEIe CG7i0kuc3JKSdtC6RYqQ9Onb2omg8hjNcTVubDnDlamZvo3F5avIniYac7Mh6016F2lj jwYRUOCaw8yrujWSXqLN5YnKuhyE/gMce7Fldgm1r4BCPBvPLdwvgpcihuKMF7HpJsCK j9bfv6MoJSL3mejBUsUVJUa8pHUaqWIk/pph97IV6RTz0CIxhMwR2lz7fQW4tXfwo+Ri 1ZRQ== 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:message-id:date:subject:cc:to :from; bh=pcXtOWPz16HWhJUASXmPpZnq98eUxm5CtO64rVArYqs=; fh=XYU1TtztkhlQv09QXeN2KBUob9SKb70zLDJqeTijfhk=; b=ndBQXy1Ks5ACtI1jrlWGmhSr+RXtJFsrUnkUwhBuZCotJw+0IXGqwKBi4WsEqYJiYG 2TsfrAR4hmWualcpVMlGIRE0ksg06yDU740ynr2GxLDvoIJiHx8zv9l55CpQ1Zg4bx1f nvghfkQmgr77rhmXU4ugs1kXn0f8qNOpUXmhol9AyxHGiT4v8A6YHiw3Z98UUJcV4Nx0 mC9xXh/4BCX8V8kAckwzMbUi3joTAi7XbTMnAeOGd3VM+o1QH7pk6o2N323qnbIpyl9W NZHx6bb5KrJSwBd2pI8d81ZoiOl4rOBbKktwBIU0qWZGwnTXrQWjxVejroWFiW12Tb8H 1R1g==; 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-95497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95497-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 i11-20020a0564020f0b00b00568213f727csi23039eda.119.2024.03.07.04.03.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 04:04:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95497-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-95497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95497-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 52FC61F28A01 for ; Thu, 7 Mar 2024 11:55:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A441712AAEA; Thu, 7 Mar 2024 11:54:46 +0000 (UTC) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) (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 E3AB012AACD; Thu, 7 Mar 2024 11:54:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709812486; cv=none; b=MYGvfN+WHKhx/RZEPcgNDSxJzKeNsfKsqYAYU157oWmjbRiM/ORbi0e/2q0j960B1xnP3lffoHYWiNh7FO7iDG+/Wv8jkmhYW5qfArQmEniw3xWbd4d2wJAefRowgZMJ1AH91ZMy6mLGwfDmKJW0AebJN3LSUdNBS+A4n9WwqMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709812486; c=relaxed/simple; bh=13cS6Nuah65OqbqxRUTX2dJdY+0xSptj5QDvZLT3Ric=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=dXQUNXZH6vtb7XB7BBn9CE1kJiOIppXRPrU52rQDlTs/1kDJNO6DOxg0KhFeqqHN0JnBLCMspzpjo2FhRyoEPc/54KnEA8zY7ch8vWhxwMjWKMvepD3sQpjtgOUprrwt5ZptqtRrczOqIgYkhZS0b712xUrpHjMJHoidnVdeudQ= 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.187 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.163.174]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4Tr72Z4LcNzwPH3; Thu, 7 Mar 2024 19:52:22 +0800 (CST) Received: from dggpemd200004.china.huawei.com (unknown [7.185.36.141]) by mail.maildlp.com (Postfix) with ESMTPS id 43500140134; Thu, 7 Mar 2024 19:54:41 +0800 (CST) Received: from huawei.com (10.175.113.32) 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; Thu, 7 Mar 2024 19:54:40 +0800 From: Liu Shixin To: Matthew Wilcox , Andrew Morton , Sasha Levin , Dan Williams , Naoya Horiguchi CC: , , , Liu Shixin Subject: [PATCH stable-5.10] mm/memory-failure: fix an incorrect use of tail pages Date: Thu, 7 Mar 2024 20:48:41 +0800 Message-ID: <20240307124841.2838010-1-liushixin2@huawei.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemd200004.china.huawei.com (7.185.36.141) 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) -- 2.25.1