From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jiri Slaby <jirislaby@gmail.com>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, rjw@sisk.pl,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.29 acpi regression: acpi_ex_extract_from_field -- div by zero
Date: Sun, 15 Mar 2009 10:49:41 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.00.0903151037210.3131@localhost.localdomain> (raw)
In-Reply-To: <49BCDCAA.8040309@gmail.com>
On Sun, 15 Mar 2009, Jiri Slaby wrote:
>
> sometimes, when booting up/resuming from disk, I get an oops[1].
>
> obj_desc->common_field.access_bit_width is zero, but even after the loop.
> Division before the loop is apparently OK.
>
> This is the case:
> /* Mask off any extra bits in the last datum */
>
> buffer_tail_bits = obj_desc->common_field.bit_length %
> obj_desc->common_field.access_bit_width;
Hmm. "bit_length" is zero too, according to the oops (it's in %eax).
Looks like the whole "obj_desc" is basically uninitialized. I have no idea
why, and why it is apparently not reliable. ACPI is odd.
Does everything work if you just do something like the appended?
It's insane, but so is ACPI.
Linus
---
drivers/acpi/acpica/exfldio.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/acpi/acpica/exfldio.c b/drivers/acpi/acpica/exfldio.c
index ef58ac4..9297adb 100644
--- a/drivers/acpi/acpica/exfldio.c
+++ b/drivers/acpi/acpica/exfldio.c
@@ -698,6 +698,9 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,
}
ACPI_MEMSET(buffer, 0, buffer_length);
+ if (!obj_desc->common_field.bit_length)
+ return_ACPI_STATUS(AE_OK);
+
/* Compute the number of datums (access width data items) */
datum_count = ACPI_ROUND_UP_TO(obj_desc->common_field.bit_length,
next prev parent reply other threads:[~2009-03-15 17:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-15 10:47 2.6.29 acpi regression: acpi_ex_extract_from_field -- div by zero Jiri Slaby
2009-03-15 17:49 ` Linus Torvalds [this message]
2009-03-15 19:08 ` Moore, Robert
2009-03-15 19:32 ` Jiri Slaby
[not found] ` <d3f22a0903152046m891dc0aq6ca01eed32a9eb32@mail.gmail.com>
2009-03-16 3:42 ` Lin Ming
2009-03-16 16:31 ` Jiri Slaby
2009-03-18 8:08 ` Jiri Slaby
2009-03-19 16:06 ` Jiri Slaby
2009-03-20 0:48 ` Lin Ming
2009-03-20 4:53 ` Lin Ming
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=alpine.LFD.2.00.0903151037210.3131@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=jirislaby@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/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