aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorRahul Chaturvedi <rkc@chromium.org>2010-07-20 18:19:33 -0400
committerMatthew Garrett <mjg@redhat.com>2010-08-03 09:48:55 -0400
commit5cf4c07a2805388b5645079039d9a8b4b9269e08 (patch)
treef5b1e2bd32be46a026bed6afa997b997ae0f6c94 /drivers/platform
parent210183d4af87cc70d7e4552d325f238734cade15 (diff)
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 9226838c867f..6abd3f15dd85 100644
--- a/drivers/platform/x86/acerhdf.c
+++ b/drivers/platform/x86/acerhdf.c
@@ -524,6 +524,10 @@ static int acerhdf_check_hardware(void)
524 version = dmi_get_system_info(DMI_BIOS_VERSION); 524 version = dmi_get_system_info(DMI_BIOS_VERSION);
525 product = dmi_get_system_info(DMI_PRODUCT_NAME); 525 product = dmi_get_system_info(DMI_PRODUCT_NAME);
526 526
527 if (!vendor || !version || !product) {
528 pr_err("error getting hardware information\n");
529 return -EINVAL;
530 }
527 531
528 pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER); 532 pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
529 533