Skip to contentSkip to conversation

Another regression in 2.6.30-rc1

PATCH Larry Finger 3 participants 5 messages Apr 9, 2009 – Apr 10, 2009 ACPI

lore
Share & tools
lore
#0 lore raw

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:

==============================================

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?)

drivers/acpi/battery.c +1 -1
index b0de631..3c7d894 100644
@@ -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;

----

Larry

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?)

drivers/acpi/battery.c +1 -1
index b0de631..3c7d894 100644
@@ -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;
#1 lore raw
Quoted 5 lines · Larry Finger

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.

Signature · 1 line
Kalle Valo
#2 lore raw
Quoted 7 lines · Kalle Valo

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

#3 lore raw

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

Quoted 3 lines · Larry Finger
Quoted 2 lines · Kalle Valo

Thanks Larry, this was very helpful. After cherry picking this commi=

t

Quoted 3 lines
Quoted 3 lines

wireless-testing is booting without errors for me.

In general sharing regressions and workarounds in this list is a ver=

y

Quoted 1 line
Quoted 1 line

good idea. I'm sure most of the people (including me) don't have tim=

e to

Quoted 3 lines
Quoted 1 line

follow lkml and find fixes for all regressions.

I make a point of following Linus's tree quite closely during the mer=

ge process

Quoted 1 line

so that the number of rebuilds is not too large when I do a bisection=

=2E For some

Quoted 1 line

reason, the stuff that comes in just before -rc1 seems to have the mo=

st

Quoted 1 line

problems. I had 3 regressions from the last two batches of commits. F=

ortunately,

Quoted 1 line

I only had to bisect two of them, but it was interesting while findin=

g the

Quoted 1 line

third. At every kernel build I had to test whether the patches for th=

e other 2

Quoted 1 line

cases needed to be installed. The 3rd regression and one of the other=

s were from

Quoted 3 lines

successive commits! Murphy rules.

When I know of unfixed problems in the wireless-testing tree, I will =

certainly

Quoted 1 line

continue to post whatever info I have, just as I rely on the members =

of this

Quoted 7 lines

list when I have a problem.

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-wirel=

ess" in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at =C2=A0http://vger.kernel.org/majordomo-info.ht=

ml

Quoted 1 line

--
To unsubscribe from this list: send the line "unsubscribe linux-wireles= s" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#4 lore raw
Quoted 2 lines · Sedat Dilek

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.

Quoted 2 lines

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.

Signature · 1 line
Kalle Valo