Skip to content

Commit

Permalink
acerhdf: driver didn't verify the pointers in which it got product in…
Browse files Browse the repository at this point in the history
…formation

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>
  • Loading branch information
Rahul Chaturvedi authored and Matthew Garrett committed Aug 3, 2010
1 parent 210183d commit 5cf4c07
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/platform/x86/acerhdf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5cf4c07

Please sign in to comment.