Re: Fw: Oops in set_spdif_output in i810_audio

From: Herbert Xu
Date: Sun Apr 03 2005 - 07:17:02 EST


On Sat, Apr 02, 2005 at 04:28:40PM -0800, Andrew Morton wrote:
>
> *** These are init messages & oops:
> i810_audio: Unknown symbol ac97_set_dac_rate
> i810_audio: Unknown symbol ac97_release_codec
> i810_audio: Unknown symbol ac97_set_adc_rate
> i810_audio: Unknown symbol ac97_alloc_codec
> i810_audio: Unknown symbol ac97_probe_codec

The codec initialisation failed so the codec is NULL.

> EIP is at i810_set_spdif_output+0x22/0x160 [i810_audio]

Boom as we dereferenced the codec.

Is there any reason why we should allow i810_probe to succeed
when there is no codec?

If not we can make i810_ac97_init fail in this case.

If so then we'll have to make sure that every dereference of
codec in this driver checks whether it's NULL.

I personally don't see a reason why we should allow it to
continue when the codec doesn't exist. What do you guys think?

Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
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/