Re: 2.6.3 oops at kobject_unregister, alsa & aic7xxx

From: Eric Kerin
Date: Tue Feb 24 2004 - 02:13:10 EST


On Tue, 2004-02-24 at 01:17, Andrew Morton wrote:
> Eric Kerin <eric@xxxxxxxxxxx> wrote:
> >
> > On Mon, 2004-02-23 at 19:07, Andrew Morton wrote:
> > > Alexander Nyberg <alexn@xxxxxxxxx> wrote:
> > > >
> > > > This happens at shutdown when alsa is to close down. I'm running debian
> > > > sid. NOTE: I recently removed my aic7xxx out of the motherboard, so the
> > > > driver obviously can't find it. But if I remove aic7xxx from the modules
> > > > list, this oops does _not_ happen.
> > >
> > > That's useful infomation. It indicates that the aic7xxx driver is screwing
> > > up the kobject lists.
> > >
> > > Just to confirm: are you saying that the aic7xxx driver is loaded at the
> > > tie of the oops, but there is no aic7xxx hardware present in the machine?
> >
> >
> > I stumbled up this in early January. I posted a patch to linux-scsi,
> > but it dosn't seem to be merged at this point. This problem will also
> > occur with the aic79xx driver.
> >
> > Here's the location of the original thread:
> > http://marc.theaimsgroup.com/?l=linux-scsi&m=107307695430108&w=2
> >
> > I just tried the patch on 2.6.3, and it still applies cleanly.
>
> hm, I was looking at that code but it seemed OK. You said "left a stale
> entry in the pci_device list". Is that correct, or was the entry in the
> PCI driver list? The latter, surely?
>
> If so, why is that a problem? ahc_linux_pci_exit() takes it out again?

You are correct it's the PCI driver list, I misspoke in my original
mail.

The AIC drivers are currently coded to unload (by returning -ENODEV from
the init function) if no devices are found, so the exit function never
gets called, leaving the stale entries.

There's a 2nd patch in the above thread that changes those modules to
stay loaded even if no devices are found, which Arjan V pointed out was
the preferred way for drivers to work.

Eric Kerin



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/