lkml.org 
[lkml]   [2005]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: Kernel oops with asus_acpi module
(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 <rdunlap@xenotime.net>
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 <rdunlap@xenotime.net>

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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-06-06 22:59    [W:0.074 / U:1.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site