[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100619134446.7b5e76d3.peter@piie.net>
Date: Sat, 19 Jun 2010 13:44:46 +0200
From: Peter Feuerer <peter@...e.net>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Peter Feuerer <peter@...e.net>, linux-kernel@...r.kernel.org,
Borislav Petkov <petkovbb@...glemail.com>, lenb@...nel.org,
Andreas Mohr <andi@...as.de>
Subject: [PATCH 3/4] Driver didn't verify the pointers in which it got
product information
[PATCH 3/4] Driver didn't verify the pointers in which it got product information
back from DMI; on QEMU one of the pointers came back null,
which made the driver crash and subsequently caused a kernel panic.
From: Rahul Chaturvedi <rkc@...omium.org>
Signed-off-by: Rahul Chaturvedi <rkc@...omium.org>
Signed-off-by: Peter Feuerer <peter@...e.net>
Cc: Borislav Petkov <petkovbb@...il.com>
Cc: Andreas Mohr <andi@...as.de>
Cc: Len Brown <lenb@...nel.org>
---
drivers/platform/x86/acerhdf.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/platform/x86/acerhdf.c b/drivers/platform/x86/acerhdf.c
index 9226838..6abd3f1 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -524,6 +524,10 @@ static int acerhdf_check_hardware(void)
version = dmi_get_system_info(DMI_BIOS_VERSION);
product = dmi_get_system_info(DMI_PRODUCT_NAME);
+ if (!vendor || !version || !product) {
+ pr_err("error getting hardware information\n");
+ return -EINVAL;
+ }
pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
--
1.7.1
--
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