Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966386AbZLHVSw (ORCPT ); Tue, 8 Dec 2009 16:18:52 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S966331AbZLHVSr (ORCPT ); Tue, 8 Dec 2009 16:18:47 -0500 Received: from one.firstfloor.org ([213.235.205.2]:49562 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966293AbZLHVQf (ORCPT ); Tue, 8 Dec 2009 16:16:35 -0500 From: Andi Kleen References: <200912081016.198135742@firstfloor.org> In-Reply-To: <200912081016.198135742@firstfloor.org> To: fengguang.wu@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] [25/31] HWPOISON: Don't do early filtering if filter is disabled Message-Id: <20091208211641.8A2FBB151F@basil.firstfloor.org> Date: Tue, 8 Dec 2009 22:16:41 +0100 (CET) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 953 Lines: 33 Signed-off-by: Andi Kleen --- mm/hwpoison-inject.c | 3 +++ 1 file changed, 3 insertions(+) Index: linux/mm/hwpoison-inject.c =================================================================== --- linux.orig/mm/hwpoison-inject.c +++ linux/mm/hwpoison-inject.c @@ -18,6 +18,8 @@ static int hwpoison_inject(void *data, u if (!capable(CAP_SYS_ADMIN)) return -EPERM; + if (!hwpoison_filter_enable) + goto inject; if (!pfn_valid(pfn)) return -ENXIO; @@ -48,6 +50,7 @@ static int hwpoison_inject(void *data, u if (err) return 0; +inject: printk(KERN_INFO "Injecting memory failure at pfn %lx\n", pfn); return __memory_failure(pfn, 18, MF_COUNT_INCREASED); } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/