[PATCH] corruption checker: print the DMI board name on corruption

From: Arjan van de Ven
Date: Wed Oct 29 2008 - 12:24:44 EST


when the memory corruptor checker hits (as it has done now based on
kerneloops.org data), it would be extremely useful to know the DMI board
name so we can add a blacklist for such a machine... without having to ask
the user for lots of extra info.

Signed-off-by: Arjan van de Ven <arjan@xxxxxxxxxxxxxxx>
---
arch/x86/kernel/setup.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 0fa6790..d57fee2 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -697,6 +697,7 @@ void check_for_bios_corruption(void)
{
int i;
int corruption = 0;
+ const char *board;

if (!memory_corruption_check)
return;
@@ -715,7 +716,11 @@ void check_for_bios_corruption(void)
}
}

- WARN(corruption, KERN_ERR "Memory corruption detected in low memory\n");
+ board = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (!board)
+ board = "";
+ WARN_ONCE(corruption, KERN_ERR "Memory corruption detected in low memory\nBoard name: %s\n",
+ board);
}

static void periodic_check_for_corruption(unsigned long data)
--
1.5.5.1

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