Skip to contentSkip to conversation

CHROMIUM: acerhdf: fix bug when running on Qemu

PATCH [email protected] 4 participants 4 messages May 6, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

[email protected]

author Acked-by
#1 lore raw

Quoting Rahul Chaturvedi <[email protected]>:

Quoted 26 lines

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.

---
 drivers/platform/x86/acerhdf.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/platform/x86/acerhdf.c +5 -1
index 4d922e4..e8ee3b2 100644
@@ -500,6 +500,11 @@ static int acerhdf_check_hardware(void)
 	product = dmi_get_system_info(DMI_PRODUCT_NAME);
 
 
+	if (!vendor || !version || !product) {
+		pr_err("error getting hardware information");
+		return -EINVAL;
+	}
+
 	pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
 
 	if (force_bios[0]) {
--
Quoted 3 lines

1.7.0.1

#2 lore raw
In reply to a message not in the archive

BTW, the CHROMIUM in the subject is just used for internal bookeeping for patches not yet accepted upstream.

Quoted 29 lines · Rahul Chaturvedi

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.

---
 drivers/platform/x86/acerhdf.c |    5 +++++

 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/platform/x86/acerhdf.c +5 -1
index 4d922e4..e8ee3b2 100644
@@ -500,6 +500,11 @@ static int acerhdf_check_hardware(void)
        product = dmi_get_system_info(DMI_PRODUCT_NAME);
 
 
+       if (!vendor || !version || !product) {
+               pr_err("error getting hardware information");
+               return -EINVAL;
+       }
+
        pr_info("Acer Aspire One Fan driver, v.%s\n", DRV_VER);
 
        if (force_bios[0]) {
--

1.7.0.1

#3 lore raw
Quoted 2 lines · Rahul Chaturvedi

BTW, the CHROMIUM in the subject is just used for internal bookeeping for patches not yet accepted upstream.

What does it mean? Should I take care about getting it upstream?

--peter;

#4 lore raw
Quoted 7 lines · Peter Feuerer
Quoted 2 lines · Rahul Chaturvedi

BTW, the CHROMIUM in the subject is just used for internal bookeeping for patches not yet accepted upstream.

What does it mean? Should I take care about getting it upstream?

You can drop it. We use it for internal bookkeeping in the chromium git tree.

http://chromiumos-git/?p=kernel.git

Its useful to us when we rebase our kernel to a new 2.6.x. We use it to record which tree the patch came from: did it come from upstream, did we write, did we pull it from a maintainer tree.

Quoted 1 line

--peter;