[alsa-devel] [PATCH] ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync()

Liam Girdwood lrg at slimlogic.co.uk
Tue Jan 11 12:45:56 CET 2011


On Tue, 2011-01-11 at 11:24 +0000, Dimitris Papastamos wrote:
> The size of the lzo syncing bitmap was incorrectly set to the size
> of the cache times the word size, however, the correct size is the
> size of the cache.
> 
> Signed-off-by: Dimitris Papastamos <dp at opensource.wolfsonmicro.com>
> ---
>  sound/soc/soc-cache.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c
> index a9ebc07..8c2a21a 100644
> --- a/sound/soc/soc-cache.c
> +++ b/sound/soc/soc-cache.c
> @@ -1361,7 +1361,7 @@ static int snd_soc_lzo_cache_init(struct snd_soc_codec *codec)
>  			goto err;
>  		}
>  		lzo_blocks[i]->sync_bmp = sync_bmp;
> -		lzo_blocks[i]->sync_bmp_nbits = reg_size;
> +		lzo_blocks[i]->sync_bmp_nbits = bmp_size;
>  		/* alloc the working space for the compressed block */
>  		ret = snd_soc_lzo_prepare(lzo_blocks[i]);
>  		if (ret < 0)

Acked-by: Liam Girdwood <lrg at slimlogic.co.uk>
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk



More information about the Alsa-devel mailing list