[alsa-devel] [PATCH] cs4232: fix crash during chip PNP detection

Rene Herman rene.herman at keyaccess.nl
Wed Jul 23 12:04:38 CEST 2008


On 23-07-08 07:48, Krzysztof Helt wrote:

Jaroslav or Takashi: would like to be in .27. Not a regression, but very 
minimal fix.

> From: Krzysztof Helt <krzysztof.h1 at wp.pl>
> 
> The acard->wss pointer is uninitialized in this function
> which leads to crash during chip PNP detection.
> 
> Signed-off-by: Krzysztof Helt <krzysztof.h1 at wp.pl>
> ---
> This bug was found in the 2.6.26-git9 kernel.

ACK.

Looking back, it seems this was broken at least as far back as 2.6.20 
which would nicely show how much testing that code path gets. Do I 
understand correctly from the backtrace that you have the PNPBIOS 
hardware? If so, good...

> --- linux-2.6.26/sound/isa/cs423x/cs4236.c~	2008-07-23 07:40:16.129637645 +0200
> +++ linux-2.6.26/sound/isa/cs423x/cs4236.c	2008-07-23 07:40:32.905641806 +0200
> @@ -325,6 +325,7 @@ static int __devinit snd_cs423x_pnp_init
>  static int __devinit snd_card_cs4232_pnp(int dev, struct snd_card_cs4236 *acard,
>  					 struct pnp_dev *pdev)
>  {
> +	acard->wss = pdev;
>  	if (snd_cs423x_pnp_init_wss(dev, acard->wss) < 0)
>  		return -EBUSY;
>  	cport[dev] = -1;
> 

Acked-by: Rene Herman <rene.herman at gmail.com>

(I believe I noticed earlier that struct snd_cs4236->wss, ctrl and mpu 
really needn't/shouldn't be kept around in the first place and you could 
just pass pdev directly as well but that's for another cleanup; this has 
it look most similar to the card variant)

Rene.



More information about the Alsa-devel mailing list