From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:47864 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933099AbcAZAsK (ORCPT ); Mon, 25 Jan 2016 19:48:10 -0500 Subject: Patch "ASoC: rt286: Fix run time error while modifying const data" has been added to the 4.3-stable tree To: axel.lin@ingics.com, broonie@kernel.org, gregkh@linuxfoundation.org Cc: , From: Date: Mon, 25 Jan 2016 16:48:09 -0800 Message-ID: <1453769289161109@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled ASoC: rt286: Fix run time error while modifying const data to the 4.3-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: asoc-rt286-fix-run-time-error-while-modifying-const-data.patch and it can be found in the queue-4.3 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From dc6d84c69cf8296b1e8e2fd0b1e115b7787ef4e9 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 5 Oct 2015 21:22:40 +0800 Subject: ASoC: rt286: Fix run time error while modifying const data From: Axel Lin commit dc6d84c69cf8296b1e8e2fd0b1e115b7787ef4e9 upstream. Make a copy of memory for index_cache rather than directly use the rt286_index_def to avoid run time error. Fixes: c418a84a8c8f ("ASoC: Constify reg_default tables") Signed-off-by: Axel Lin Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/codecs/rt286.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- a/sound/soc/codecs/rt286.c +++ b/sound/soc/codecs/rt286.c @@ -38,7 +38,7 @@ #define RT288_VENDOR_ID 0x10ec0288 struct rt286_priv { - const struct reg_default *index_cache; + struct reg_default *index_cache; int index_cache_size; struct regmap *regmap; struct snd_soc_codec *codec; @@ -1161,7 +1161,11 @@ static int rt286_i2c_probe(struct i2c_cl return -ENODEV; } - rt286->index_cache = rt286_index_def; + rt286->index_cache = devm_kmemdup(&i2c->dev, rt286_index_def, + sizeof(rt286_index_def), GFP_KERNEL); + if (!rt286->index_cache) + return -ENOMEM; + rt286->index_cache_size = INDEX_CACHE_SIZE; rt286->i2c = i2c; i2c_set_clientdata(i2c, rt286); Patches currently in stable-queue which might be from axel.lin@ingics.com are queue-4.3/asoc-rt286-fix-run-time-error-while-modifying-const-data.patch