From: Dimitris Papastamos Date: Tue, 11 Jan 2011 11:24:02 +0000 (+0000) Subject: ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() X-Git-Tag: v2.6.38-rc1~7^2^2~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04f8fd176c9c105dc0025486cfab9dc779288b3e;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() 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 Acked-by: Liam Girdwood Signed-off-by: Mark Brown --- 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)