lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 4 Aug 2015 20:20:38 +0800
From:	Wang Xiaoqiang <wangxq10@....edu.cn>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>
Subject: [PATCH] memory-failure/hwpoison_user_mappings: move the comment
 about swap cache pages' check to proper location

Hi Naoya,

This patch just move the comment about swap cache pages' check to the
proper location in 'hwpoison_user_mappings' function.

Signed-off-by: Wang Xiaoqiang <wangxq10@....edu.cn>
---
 mm/memory-failure.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 1cf7f29..3253abb 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -945,10 +945,6 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 	if (!(PageLRU(hpage) || PageHuge(p)))
 		return SWAP_SUCCESS;
 
-	/*
-	 * This check implies we don't kill processes if their pages
-	 * are in the swap cache early. Those are always late kills.
-	 */
 	if (!page_mapped(hpage))
 		return SWAP_SUCCESS;
 
@@ -957,6 +953,10 @@ static int hwpoison_user_mappings(struct page *p, unsigned long pfn,
 		return SWAP_FAIL;
 	}
 
+	/*
+	 * This check implies we don't kill processes if their pages
+	 * are in the swap cache early. Those are always late kills.
+	 */
 	if (PageSwapCache(p)) {
 		printk(KERN_ERR
 		       "MCE %#lx: keeping poisoned page in swap cache\n", pfn);
-- 
1.7.10.4



--
thx!
Wang Xiaoqiang


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ