2009-04-09 15:37:44

by Larry Finger

[permalink] [raw]
Subject: Another regression in 2.6.30-rc1

commit 5d38258ec026921a7b266f4047ebeaa75db358e5
Author: Vegard Nossum <[email protected]>
Date: Tue Apr 7 10:55:38 2009 +0200

ACPI battery: fix async boot oops

> BUG: unable to handle kernel NULL pointer dereference at (null)

What happens is that the battery module's init sections are being freed
before the async callback (which was marked __init) has run. This theory
is supported by the fact that the bad RIP value is a vmalloc address.

The immediate fix is to make this a non-init call.

(A better long-term fix is of course to wait with init-section unloading
until a module's async initcalls have been run, which would allow us to
discard this function which is still only run once, after all. Perhaps a
new async_initcall() function for the async/module API, if this is needed
for other modules in the future?)

Reported-by: Arkadiusz Miskiewicz <[email protected]>
Signed-off-by: Vegard Nossum <[email protected]>
Tested-by: Alessandro Suardi <[email protected]>
Tested-by: Rafael J. Wysocki <[email protected]>
Signed-off-by: Len Brown <[email protected]>

diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index b0de631..3c7d894 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -903,7 +903,7 @@ static struct acpi_driver acpi_battery_driver = {
},
};

-static void __init acpi_battery_init_async(void *unused, async_cookie_t cookie)
+static void acpi_battery_init_async(void *unused, async_cookie_t cookie)
{
if (acpi_disabled)
return;


Attachments:
battery_init_async (1.56 kB)

2009-04-10 04:34:55

by Kalle Valo

[permalink] [raw]
Subject: Re: Another regression in 2.6.30-rc1

Larry Finger <[email protected]> writes:

> If you are implementing kernel 2.6.30-rc1 from wireless-testing, there is a
> regression that will hit you if you have the ACPI battery routines enabled. The
> symptom is an oops on boot with the line "> BUG: unable to handle kernel NULL
> pointer dereference at (null)". The patch for this, which comes from
> 2.6.30-rc1-git1 in Linus's tree, is as follows:

Thanks Larry, this was very helpful. After cherry picking this commit
wireless-testing is booting without errors for me.

In general sharing regressions and workarounds in this list is a very
good idea. I'm sure most of the people (including me) don't have time to
follow lkml and find fixes for all regressions.

--
Kalle Valo

2009-04-10 05:13:59

by Sedat Dilek

[permalink] [raw]
Subject: Re: Another regression in 2.6.30-rc1

Hi Larry,

I think it is a good choice to put informations about regressions in
Linus-tree in a separate Email as you did for wireless-tesing ML.
I reported about ACPI-battery issue [1] already, but I think it
"disappeared" in the flood of replies.

Kind Regards,
Sedat

[1] http://marc.info/?l=3Dlinux-wireless&m=3D123919839513697&w=3D2

On Fri, Apr 10, 2009 at 6:59 AM, Larry Finger <[email protected]=
t> wrote:
> Kalle Valo wrote:
>>
>> Thanks Larry, this was very helpful. After cherry picking this commi=
t
>> wireless-testing is booting without errors for me.
>>
>> In general sharing regressions and workarounds in this list is a ver=
y
>> good idea. I'm sure most of the people (including me) don't have tim=
e to
>> follow lkml and find fixes for all regressions.
>
> I make a point of following Linus's tree quite closely during the mer=
ge process
> so that the number of rebuilds is not too large when I do a bisection=
=2E For some
> reason, the stuff that comes in just before -rc1 seems to have the mo=
st
> problems. I had 3 regressions from the last two batches of commits. F=
ortunately,
> I only had to bisect two of them, but it was interesting while findin=
g the
> third. At every kernel build I had to test whether the patches for th=
e other 2
> cases needed to be installed. The 3rd regression and one of the other=
s were from
> successive commits! Murphy rules.
>
> When I know of unfixed problems in the wireless-testing tree, I will =
certainly
> continue to post whatever info I have, just as I rely on the members =
of this
> list when I have a problem.
>
> Larry
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wirel=
ess" in
> the body of a message to [email protected]
> More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=
ml
>

2009-04-10 04:59:43

by Larry Finger

[permalink] [raw]
Subject: Re: Another regression in 2.6.30-rc1

Kalle Valo wrote:
>
> Thanks Larry, this was very helpful. After cherry picking this commit
> wireless-testing is booting without errors for me.
>
> In general sharing regressions and workarounds in this list is a very
> good idea. I'm sure most of the people (including me) don't have time to
> follow lkml and find fixes for all regressions.

I make a point of following Linus's tree quite closely during the merge process
so that the number of rebuilds is not too large when I do a bisection. For some
reason, the stuff that comes in just before -rc1 seems to have the most
problems. I had 3 regressions from the last two batches of commits. Fortunately,
I only had to bisect two of them, but it was interesting while finding the
third. At every kernel build I had to test whether the patches for the other 2
cases needed to be installed. The 3rd regression and one of the others were from
successive commits! Murphy rules.

When I know of unfixed problems in the wireless-testing tree, I will certainly
continue to post whatever info I have, just as I rely on the members of this
list when I have a problem.

Larry



2009-04-10 05:19:17

by Kalle Valo

[permalink] [raw]
Subject: Re: Another regression in 2.6.30-rc1

Sedat Dilek <[email protected]> writes:

> I think it is a good choice to put informations about regressions in
> Linus-tree in a separate Email as you did for wireless-tesing ML.

Yes, I agree. Also it's good idea to pay attention to the subject, for
example having a word regression in the subject always draws my attention.

> I reported about ACPI-battery issue [1] already, but I think it
> "disappeared" in the flood of replies.

Yeah, I missed that altogether. I'm trying to read all mails for
linux-wireless list, but sometimes I just seem to skim some of them.

--
Kalle Valo