mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: randy_dunlap <rdunlap@xenotime.net>
To: "Hanno Böck" <mail@hboeck.de>,
	acpi-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Cc: sziwan@users.sourceforge.net, julien.lerouge@free.fr
Subject: Re: Kernel oops with asus_acpi module
Date: Mon, 6 Jun 2005 13:54:59 -0700	[thread overview]
Message-ID: <20050606135459.7ad699ae.rdunlap@xenotime.net> (raw)
In-Reply-To: <200506062050.42632.mail@hboeck.de>

(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;

  parent reply	other threads:[~2005-06-06 20:55 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-05 21:40 Hanno Böck
2005-06-06 16:50 ` randy_dunlap
     [not found] ` <200506061929.24663.mail@hboeck.de>
     [not found]   ` <20050606114531.763eec37.rdunlap@xenotime.net>
     [not found]     ` <200506062050.42632.mail@hboeck.de>
2005-06-06 20:54       ` randy_dunlap [this message]
2005-06-06 21:32         ` Karol Kozimor
2005-06-06 21:47           ` Hanno Böck
2005-06-06 22:21             ` [ACPI] " Karol Kozimor
2005-06-07 17:46               ` Hanno Böck
2005-06-07 22:16                 ` randy_dunlap
2005-06-11 12:17                   ` Karol Kozimor
2005-10-11  9:01                     ` Hanno Böck
2005-06-11 12:19                 ` Karol Kozimor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050606135459.7ad699ae.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=julien.lerouge@free.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mail@hboeck.de \
    --cc=sziwan@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®