Patch "firmware: cs_dsp: Fix new control name check" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    firmware: cs_dsp: Fix new control name check

to the 6.1-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:
     firmware-cs_dsp-fix-new-control-name-check.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 39a191033c6720e21b72dd27d4ccee147d0280fa
Author: Vlad Karpovich <vkarpovi@xxxxxxxxxxxxxxxxxxxxx>
Date:   Tue Aug 15 12:29:08 2023 -0500

    firmware: cs_dsp: Fix new control name check
    
    [ Upstream commit 7ac1102b227b36550452b663fd39ab1c09378a95 ]
    
    Before adding a new FW control, its name is checked against
    existing controls list. But the string length in strncmp used
    to compare controls names is taken from the list, so if beginnings
    of the controls are matching,  then the new control is not created.
    For example, if CAL_R control already exists, CAL_R_SELECTED
    is not created.
    The fix is to compare string lengths as well.
    
    Fixes: 6477960755fb ("ASoC: wm_adsp: Move check for control existence")
    Signed-off-by: Vlad Karpovich <vkarpovi@xxxxxxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230815172908.3454056-1-vkarpovi@xxxxxxxxxxxxxxxxxxxxx
    Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 81cc3d0f6eec1..81c5f94b1be11 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -939,7 +939,8 @@ static int cs_dsp_create_control(struct cs_dsp *dsp,
 		    ctl->alg_region.alg == alg_region->alg &&
 		    ctl->alg_region.type == alg_region->type) {
 			if ((!subname && !ctl->subname) ||
-			    (subname && !strncmp(ctl->subname, subname, ctl->subname_len))) {
+			    (subname && (ctl->subname_len == subname_len) &&
+			     !strncmp(ctl->subname, subname, ctl->subname_len))) {
 				if (!ctl->enabled)
 					ctl->enabled = 1;
 				return 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux