Re: Kernel oops with asus_acpi module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



(back to mailing lists + asus acpi maintainers)


On Mon, 6 Jun 2005 20:50:42 +0200 Hanno Böck wrote:

| Am Montag, 6. Juni 2005 20:45 schrieben Sie:
| > 2 or 3 things:
| >
| > a.  I can't match that Code line to any code in my
| > compiler asus_acpi.o file.  What version of gcc are you using?
| > Can you send me your asus_acpi.o file?
| 
| Attached.
| I'm using gcc4 (but that's probably not the reason, because matthias hentges, 
| who has a debian-system, has the same problem)

Well, gcc4 does have some known issues with the Linux kernel,
although I don't know the specifics of them.

| >
| > b.  That Code line is different from the first one that you posted.
| > That doesn't make much sense to me....
| 
| Don't know why, but maybe because I recompiled the kernel with 
| debugging-support?

OK, I see that part.

I'm including a patch for you to try.  Can you apply and test it
and report back on it, please?

---

From: Randy Dunlap <[email protected]>
linux-2612-rc5-mm2

model->string.pointer was NULL, so printk of it caused an oops.

Handle ASUS ACPI string descriptor with 0 length or NULL pointer
by trying the Samsung P30 support code exception handling.

Signed-off-by: Randy Dunlap <[email protected]>

diffstat:=
 drivers/acpi/asus_acpi.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -Naurp ./drivers/acpi/asus_acpi.c~asus_models ./drivers/acpi/asus_acpi.c
--- ./drivers/acpi/asus_acpi.c~asus_models	2005-03-01 23:37:53.000000000 -0800
+++ ./drivers/acpi/asus_acpi.c	2005-06-06 13:51:40.000000000 -0700
@@ -993,6 +993,7 @@ static int __init asus_hotk_get_info(voi
 	/* Samsung P30 has a device with a valid _HID whose INIT does not 
 	 * return anything. Catch this one and any similar here */
 	if (buffer.pointer == NULL) {
+try_p30:
 		if (asus_info && /* Samsung P30 */
 		    strncmp(asus_info->oem_table_id, "ODEM", 4) == 0) {
 			hotk->model = P30;
@@ -1009,7 +1010,15 @@ static int __init asus_hotk_get_info(voi
 	
 	model = (union acpi_object *) buffer.pointer;
 	if (model->type == ACPI_TYPE_STRING) {
-		printk(KERN_NOTICE "  %s model detected, ", model->string.pointer);
+		if (!model->string.length || !model->string.pointer) {
+			printk(KERN_WARNING "  model string length or pointer "
+				"is 0, trying P30 exceptions (%u, %p)\n",
+				model->string.length, model->string.pointer);
+			goto try_p30;
+		}
+		else
+			printk(KERN_NOTICE "  %s model detected, ",
+				model->string.pointer);
 	}
 
 	hotk->model = END_MODEL;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux