aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorRahul Chaturvedi <rkc@chromium.org>2010-07-20 15:19:33 -0700
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:48:55 -0400
commit5cf4c07a2805388b5645079039d9a8b4b9269e08 (patch)
treef5b1e2bd32be46a026bed6afa997b997ae0f6c94 /drivers/platform
parent210183d4af87cc70d7e4552d325f238734cade15 (diff)
downloadkernel_samsung_crespo-5cf4c07a2805388b5645079039d9a8b4b9269e08.zip
kernel_samsung_crespo-5cf4c07a2805388b5645079039d9a8b4b9269e08.tar.gz
kernel_samsung_crespo-5cf4c07a2805388b5645079039d9a8b4b9269e08.tar.bz2
acerhdf: driver didn't verify the pointers in which it got product information
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. Signed-off-by: Rahul Chaturvedi <rkc@chromium.org> Signed-off-by: Peter Feuerer <peter@piie.net> Cc: Borislav Petkov <petkovbb@gmail.com> Cc: Andreas Mohr <andi@lisas.de> Cc: Len Brown <lenb@kernel.org> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/acerhdf.c4
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);