From patchwork Mon Dec 18 13:58:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 13497022 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 34BECC35274 for ; Mon, 18 Dec 2023 13:58:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 83D7D8D0002; Mon, 18 Dec 2023 08:58:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7EC5B8D0006; Mon, 18 Dec 2023 08:58:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6CE538D0002; Mon, 18 Dec 2023 08:58:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 5DA268D0001 for ; Mon, 18 Dec 2023 08:58:48 -0500 (EST) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 22E2D1C1EB8 for ; Mon, 18 Dec 2023 13:58:48 +0000 (UTC) X-FDA: 81580094736.25.6F91B60 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id E16C3100012 for ; Mon, 18 Dec 2023 13:58:45 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tbT6UXkl; dmarc=none; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702907926; a=rsa-sha256; cv=none; b=4MHKRnGf8TYOmCzDtTtqwHP9h3nc4IugIbYI+HCg0T4nHasKk6k6FrYMInl+C/hf/i1nvO UaGLQbWHAkRCY7M6NjnXdT9o45wNb80YTAMbdM6yEnVy6SdTHz/PZllSz6zAiq8tO2GKbt gHbKE1AFR7PrUNEE3SKf3k0fW23TzEc= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=tbT6UXkl; dmarc=none; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702907926; 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-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=VUi9QI3wp9AnsIIxMP75yqNfaus1mITUxCI9LsshRa4=; b=3FgSE7Z9jz+mBFDPinZZN8p4dlYYpyUHsTlwrGSqBc5BZVLZkrMx+asMVPdge968A38SBa 5rr/WEI0IG1XX3XOdUzLS188Yw+9eefBg0W/PZaPDR7WbMnaNIyjYeFNGP3/3nsONxraye E959sISKtMVbt51fWhHgYCXcN7IF1r8= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=VUi9QI3wp9AnsIIxMP75yqNfaus1mITUxCI9LsshRa4=; b=tbT6UXkleZe42uJ52cbqDOnvgf F+31eJTt4VIybbE0aAopYsPTwenm0obu0EgMjPiZE2WL67el6GZBonyuHKjDNfLCaKFL34b0YSXPp GRblmsCZadgGr6oGp1eGxlQIufU44i/prQeXnFlaWURm2u/B422Vk86Gdz47p3VZWha+HpAiYq0UW F1EoT+ia9kTklK8/CLWPtMQCV+i3oX3oOKBkNsAepZ9nqu4Wp56GB95Uh7fMZxe8MRZYBU32OvWjj 4jtFd9KftJhqTYGoHMfHK1BGPUxSBObrtLIIscLaPcMNdmQySu79xuorc3D0tmpXvS/g7HH+6o0Tv j5poVKow==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1rFE8l-00DtCK-8v; Mon, 18 Dec 2023 13:58:39 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org, Naoya Horiguchi , Dan Williams Subject: [PATCH 0/3] Three memory-failure fixes Date: Mon, 18 Dec 2023 13:58:34 +0000 Message-Id: <20231218135837.3310403-1-willy@infradead.org> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: E16C3100012 X-Stat-Signature: yy4ou3obcbwfezqejsgz91ww7cmedfby X-HE-Tag: 1702907925-388690 X-HE-Meta: U2FsdGVkX19LDqjlJhDHsNaEwehtIc6hLO6yhGQYLxz1uNtm93w2U2sxBEfqBz6P276dmRL+SAdHXWaA5xde9GE/vqQG4hzP6d+Om5rF+h4mWNV7TB0iHaNvZJKO9DP2yjnFaNCUPBAb+tIiwy86ZsHxskPz6snd3rfb7tnfY+oEc2vz0UY5LjRyztNsPskkzc4b4QhMf537REN5V+5emsB8oZKjJb5oUjFQYh76+6M8YHJ2o6dOTa0O0TXUIsPMGwb96c4+AQJo6EJigmH/Q1pTltpY89+zJ7Oo/EzF7Hm7ygYCnnrZMVo7ujlJ8ku3y7KNlas9C47v/SWbHKMacmYXYfUcZz6MLXqMcd105L2+/oTtLFDI/HDHcpPBbopddYtDnpSQqcBtl1aSsPuXYCvxTjD7CDW0mg6oCqobW/xAwrrh9UQ0/un5tmPmWasZWOP97M4h5zlPLTpZgMOfbClayyYblAEcSrOzG8U+u1+D1qqMIK4V/9NdYVDqR7Ko0un0E/PpwXSSbNlhmu1MkKQpFpPgzZZyJV5lkK27ci2SyDWYk/ZBt8Z75JL2xNZS2pZoyJqNYpBDi9i/9fYA7R3ObPumIZdGeLhI1VQ+99J86trEL04MEQDi99Qu53i1Wp6a745HG7486jFCkVFtBLb7fW6uZYHWn09VhhGWAPyMcg5uPrsS7CizuUz9g1qxNIe8RfoTyRddA0cSm5uMfQXUFN+ANp+Bem9eENm3hnEVpttuCH2sV/jmMLseTodmNSbugEyj+cDTa6X5cpaNSP9A+jrhTnR0f7KSuXyxGjAd/PNHumWIAZljBxHWShp42DvT9D/HGnpNiImV0W9zM6U+3MNv9/7IRrUiqc31Sd1tEofq+9afPkjNytZGjSQ/SEaOtEwACdLUyzHc/570wHpKhEHiGBgvUwORAZ4e+9MDK+hLo4j9k8epJjBUnviYzVT6EefzG/ssuEO8XAM Sp5zgf7g 1pczcCpqjhaUkwuVZnBMhws8LGclTwfhTIFGVcoPoNfJ+NK2zrhw3jfzaZXMZSvO7pCyHY9JpFqh4SUrFsluhWMSO0eTyVSXdabgu33mXyOt5iqbrAKcJQmRHwQ== 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: I've been looking at the memory-failure code and I believe I have found three bugs that need fixing -- one going all the way back to 2010! I'll have more patches later to use folios more extensively but didn't want these bugfixes to get caught up in that. Matthew Wilcox (Oracle) (3): mm/memory-failure: Pass the folio and the page to collect_procs() mm/memory-failure: Check the mapcount of the precise page mm/memory-failure: Cast index to loff_t before shifting it mm/memory-failure.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-)