Bug 8513 - Manually loading snd-powermac causes badness in lib/kref.c:33
Summary: Manually loading snd-powermac causes badness in lib/kref.c:33
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Sound(ALSA) (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Johannes Berg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-20 12:55 UTC by Ben Collins
Modified: 2007-09-05 09:41 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.22-rc2
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Ben Collins 2007-05-20 12:55:14 UTC
Most recent kernel where this bug did *NOT* occur: 2.6.20
Distribution: Ubuntu
Hardware Environment: PowerMac G5

Steps to reproduce:
Loading snd-aoa modules.
Comment 1 Ben Collins 2007-05-20 12:59:52 UTC
Original bug report: https://launchpad.net/bugs/115597

Snippet of oops, although this may be after the first oops (hard to tell from
bug report):

[ 958.083421] ------------[ cut here ]------------
[ 958.083436] Badness at /build/buildd/linux-source-2.6.22-2.6.22/lib/kref.c:33
[ 958.083439] Call Trace:
[ 958.083443] [c00000015d94b320] [c00000000000ff14] .show_stack+0x54/0x1f0
(unreliable)
[ 958.083456] [c00000015d94b3d0] [c0000000001bfe3c] .report_bug+0xac/0x150
[ 958.083465] [c00000015d94b460] [c0000000003cfb08]
.program_check_exception+0x288/0x670
[ 958.083474] [c00000015d94b510] [c000000000004f0c] program_check_common+0x10c/0x180
[ 958.083480] --- Exception: 700 at .kref_get+0xc/0x30
[ 958.083488] LR = .of_node_get+0x20/0x40
[ 958.083492] [c00000015d94b800] [c0000000000c5a10]
.get_page_from_freelist+0x3f0/0x7b0 (unreliable)
[ 958.083502] [c00000015d94b880] [c000000000048c28] .__pmf_find_function+0x48/0x220
[ 958.083510] [c00000015d94b980] [c000000000048e50] .pmf_find_function+0x50/0xa0
[ 958.083517] [c00000015d94ba20] [c000000000048ec0] .pmf_call_function+0x20/0x60
[ 958.083524] [c00000015d94bab0] [d00000000045ba00] .pmf_get_detect+0x60/0xd0
[snd_aoa]
[ 958.083539] [c00000015d94bb60] [d000000000414400] .detected_get+0x70/0xb0
[snd_aoa_fabric_layout]
[ 958.083548] [c00000015d94bbe0] [d0000000003384e4]
.snd_ctl_elem_read+0x174/0x180 [snd]
[ 958.083579] [c00000015d94bc80] [d00000000033ae34]
.snd_ctl_ioctl_compat+0x334/0x7f0 [snd]
[ 958.083595] [c00000015d94bd40] [c000000000149930] .compat_sys_ioctl+0x160/0x4e0
[ 958.083603] [c00000015d94be30] [c0000000000086b4] syscall_exit+0x0/0x40
Comment 2 Johannes Berg 2007-05-22 03:10:21 UTC
I've seen this bug myself but it went away when I did these two changes:
 (1) upgrade to -rc2
 (2) load snd-aoa-i2sbus at boot (/etc/modules)

so now when I load snd-aoa-i2sbus it doesn't happen any more, but I don't know
whether loading it at boot or the kernel upgrade fixed it.
Comment 3 Takashi Iwai 2007-05-30 06:15:39 UTC
Ben, does it still happen with rc3?
Comment 4 Ben Collins 2007-05-30 08:40:02 UTC
Found out the root cause of this. In prior releases we had snd-powermac added to
/etc/modules, since autoloading didn't work. Removing this allows things to work
properly, with no "badness" backtrace. However, I'd like to get this resolved so
that loading snd-powermac in this way doesn't cause horrible looking errors.
Comment 5 Takashi Iwai 2007-05-31 09:17:12 UTC
Ah OK, that explains.  I guess, however, it's no regression but a remaining
problem since old versions.  Could you try the older kernel whether the same
problem happens?
Comment 6 Ben Collins 2007-05-31 09:35:38 UTC
Actually it is a regression. Having this module loaded with 2.6.20 didn't cause
this, and snd-aoa still worked.

And regression or not, it shouldn't cause a crash :)
Comment 7 Takashi Iwai 2007-05-31 09:39:06 UTC
Thanks for confirmation.  Any chance to test 2.6.21?
It's VERY important to know that it's a regression, for finding out the bug...
Comment 8 Ben Collins 2007-05-31 09:50:44 UTC
It seems it did not occur with 2.6.21. Started somewhere around 2.6.22-rc1 or rc2.
Comment 9 Takashi Iwai 2007-06-29 11:23:55 UTC
If it's due to any change in the aoa driver, there are only a few changes.
Suspicious ones are:
- e3f9678c36dc81fde5dc86848d6d6077659ecaf0
      [ALSA] snd-aoa-i2sbus: use MODULE_DEVICE_TABLE instead of plain MODULE_ALIAS
- bf62456eb91f3d2ef0736081583d09b0b3c8b7ea
    uevent: use add_uevent_var() instead of open coding it
Other changes look pretty harmless.

Could you try to revert one of them?
Comment 10 Johannes Berg 2007-09-05 09:41:22 UTC
fixed by commit 41e904dee22066ae7ac3a7f695b2c8bd43ce4e04, the bug wasn't in snd-aoa at all

Note You need to log in before you can comment on or make changes to this bug.