Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp143466lql; Sun, 10 Mar 2024 18:52:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyS08ZaVJehPbLoh2nBXNq3NoMk8sDO79XLG2nWBUxedkFIz5RbuVQ6lDvc4r6kG/WnxP03iRMdytEmiTND52AbjSKRNWrt/qNBuW5Zg== X-Google-Smtp-Source: AGHT+IF5gpkeyLMC8sa9Mea4O2QimXu2sOhwvm5gtylh7t42U9B01c26k6FMMWHhBLHe0g2nlVOi X-Received: by 2002:a2e:9043:0:b0:2d2:8ad9:a667 with SMTP id n3-20020a2e9043000000b002d28ad9a667mr3367334ljg.17.1710121929918; Sun, 10 Mar 2024 18:52:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710121929; cv=pass; d=google.com; s=arc-20160816; b=PYv4ZVyU2GGwHLE9jQOguNBHhy2wRzO0XXedt784HxWREDxwQg7BDdaO4Fh2zm6V/9 fdLTX+cY70GAg0Rbb39YK0/H3otGFZJ3n+6MDr2F84kQxmKbHo+cYywjI9tb3SZOUkF5 ohlF8hy8HTGqaWPRwyM0E0q2fYVJgAyiE6J658ShnVhvPM3NexlzZZjfzcbDYvwwTk6J RCSKtL0UFqmZYNkp5wuM4/6RWGonJ8K4jHWVLoO8lhPI+UckxXTaJPb1GeGtxudAsftC XYa6S+mWUhRQ52Dbxh7fnhYfIuJCg/E0SYpjWjgriNfxlwvD1XIv5VqiTdeas3O/juTH x99A== 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=IVePNPtQdat/mnDb4KXD6rDrLocWZAo4xfweA7tqW7I=; fh=NgnYgg8Kb45/dtOIX/thFNLBEdHUvk4VE11uY3gY7cM=; b=BDs+hFpwH8vOqLKK/uZW5xxHdqhUJY5tP5O/syd9nNcxPpXoe/pjhHxaaWDAN+fTcl EvvaxQCpT5unocoZZ2MUxq7qJV6bJYFrsSqmdVVsUkbuJzMxryRpozYF3Q6EnIJCwESM gFCB9Nn/hMaZxTJjwwHlLQw2UPhQF0c6qPahTLKXWFBEc8bJv15pe30dIa3BOi3M+ZJr TMMID5EW25NDDd1lMtXFFQ0fRogKHDoBnzBnOm8whKM5YfFKnFBO1nF8WpweVvDcfqJ5 rEXBw9MZ/+/RsgOBvC4ix/fO8LPl/t7793PToxq66VN0iNt6sV8HgotyA+gO5gti4klX FeeA==; 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-98405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98405-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 w21-20020a056402269500b005683b59c6b5si1939237edd.17.2024.03.10.18.52.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Mar 2024 18:52:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98405-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-98405-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98405-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 9FEE81F213BB for ; Mon, 11 Mar 2024 01:52:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D02AA10E9; Mon, 11 Mar 2024 01:52:02 +0000 (UTC) Received: from szxga04-in.huawei.com (szxga04-in.huawei.com [45.249.212.190]) (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 6961BEBE; Mon, 11 Mar 2024 01:51:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.190 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710121922; cv=none; b=d8txKkYz78ItyEQfxfTvMqYOvE6B/1U8Ao6qzscHxVNTUlHj7FaJDzzoTE3S6+gibZTllXA0PrmHPSKxuMC1Kc/8jC7gTlsfF7QUNsJqXvTcFCZOhq8mAyseD6jkmLK1WMzViFV94WJPTYVxpctonW/XU5rH9wj5OJXy03LInZs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710121922; c=relaxed/simple; bh=lcvb6GVZVmZ7eBM8aE5/I0RYqZqgLNHqdjhd/cKtC90=; h=Subject:To:References:CC:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=c2nrjNFhPaKiPVyVLNj7A4Hhpu2JfdbPbhDQU94W+951FEHXD9iK7c4jlbOFLSiVw1O1rXQY0+wEzolRcCtXE/fS9dhgZAJLUx4F2zLvSkMsv+UL0GeUr6NteXIwlQUOiE6AV6HoJD03tDcZ5roV7zEWg+lU4y7IaGOhesnSM7g= 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.190 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.17]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4TtKT80PTJz2BfpM; Mon, 11 Mar 2024 09:49:32 +0800 (CST) Received: from dggpemd200004.china.huawei.com (unknown [7.185.36.141]) by mail.maildlp.com (Postfix) with ESMTPS id 4177A1A0172; Mon, 11 Mar 2024 09:51:57 +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, 11 Mar 2024 09:51:56 +0800 Subject: Re: [PATCH stable-5.10] mm/memory-failure: fix an incorrect use of tail pages To: Greg Kroah-Hartman References: <20240307124841.2838010-1-liushixin2@huawei.com> CC: Matthew Wilcox , Andrew Morton , Sasha Levin , Dan Williams , Naoya Horiguchi , , , From: Liu Shixin Message-ID: Date: Mon, 11 Mar 2024 09:51:56 +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: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemd200004.china.huawei.com (7.185.36.141) Hi, Greg, There is a bugfix for 5.10-stable, 5.4-stable, 4.19-stable. Introduced when backport commit c79c5a0a00a9 ("mm/memory-failure: check the mapcount of the precise page"). [1]: https://lore.kernel.org/stable/20240307124841.2838010-1-liushixin2@huawei.com/ [2]: https://lore.kernel.org/stable/20240307125053.2847205-1-liushixin2@huawei.com/ [3]: https://lore.kernel.org/stable/20240307125150.2849068-1-liushixin2@huawei.com/ 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)