From patchwork Mon Mar 22 12:26:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 406131 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3527237jai; Mon, 22 Mar 2021 05:33:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXKXDwna1gd3DgyhKKF9h9zuanyjBD5WOOGBtRenqfiSfDnCkdIa9GXjPVCn40vdOrqrqL X-Received: by 2002:a50:ec0e:: with SMTP id g14mr25537957edr.264.1616416418404; Mon, 22 Mar 2021 05:33:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616416418; cv=none; d=google.com; s=arc-20160816; b=KDoDltzL/fZkeBSyPSpmIEbyTrdeWcf5mMB9YWeiJLQN6ROG7jTYORtsoLVjvc0aJz qiNmXXlHkgQrXgPCEAqdz5z+/uTDop1ajU7QS0AvqsXEpVKga5B7s3ahdLzpcxoU6iZr KdrPPvbj3iOeJn2LAbLpsUBGDtkSCy1jOZwV87LOFKg+VsL9tv5vTFQB2BSxt5ToKZC3 hfT6O3HVfhbsrxrfZwH9Sv0JxwiQM3J0Gk10bXl+xobHoOnhjnEDqKPgqNztyibHq5Ag LVT6NF/gzvvG+q/LcN+Dd9DLouYAAs2npb+Xj4BMH8sHscCw3fb21rl15qvF1BT4TMhh Iodw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=rdslS73O4HulGVUeHs6/g/c8Z6kYhCvcRiNafgAGNqI=; b=VL8oN/SqipsZgzVO/JBmdL8Ko4J1YXZbmAUlLQJsyY867IQrO5hYhtwV/PDKtEcB5B Z0m7RiNrtBOYhZgD4AbB5G5482nIOtXWfTX9HheiXdtMfIfMn+53G7i3xP16ONLVMSqy HFuMPudYavSB2IJ/SudK/WJrDYyaEhnUFtO6FkoWs/KIZcUnnIjAk2iF1rxE9v9IBclE Ax2rZxP0jUS6Obsi5wgKkc6iFabS4V4jIKq5GkXklYAm/umR9ZUsy9Ax9cF4Spc1kkFQ 9jV5fG3BDaZWOnD8eNt41+iNA2/tF5RC4ZaLqoBHO43fade0bmMHR2qoCJPtHyd16qJE S7FA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="b6Z5Tq/o"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si11105155edy.321.2021.03.22.05.33.38; Mon, 22 Mar 2021 05:33:38 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="b6Z5Tq/o"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231549AbhCVMdG (ORCPT + 12 others); Mon, 22 Mar 2021 08:33:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:54826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbhCVMcJ (ORCPT ); Mon, 22 Mar 2021 08:32:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 174F161992; Mon, 22 Mar 2021 12:31:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1616416319; bh=oXE1iUftqQGBVpvJSf3ey9Cgm92izoSfFtkaZ/CNuuc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6Z5Tq/o1y48hHrAGxi0Th7fOx0J4mW7QlLepj3seSqwROe2yA00azkJ7+ARoe8bu T4VCJ6JirIAkkrsdMDgQt0LdDux4g91stYPXkPhOL++mwBnRXPUHbYn7rypx0KMWEC 6MLYc7JvJgwH7da00nz2HloQqq5T5iLFm6CX1TaA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, John Stultz , Srinivas Kandagatla , Mark Brown Subject: [PATCH 5.11 034/120] ASoC: qcom: sdm845: Fix array out of range on rx slim channels Date: Mon, 22 Mar 2021 13:26:57 +0100 Message-Id: <20210322121930.799909440@linuxfoundation.org> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210322121929.669628946@linuxfoundation.org> References: <20210322121929.669628946@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Srinivas Kandagatla commit 4800fe6ea1022eb240215b1743d2541adad8efc7 upstream. WCD934x has only 13 RX SLIM ports however we are setting it as 16 in set_channel_map, this will lead to array out of bounds error! Orignally caught by enabling USBAN array out of bounds check: Fixes: 5caf64c633a3 ("ASoC: qcom: sdm845: add support to DB845c and Lenovo Yoga") Reported-by: John Stultz Signed-off-by: Srinivas Kandagatla Link: https://lore.kernel.org/r/20210309142129.14182-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/qcom/sdm845.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/qcom/sdm845.c +++ b/sound/soc/qcom/sdm845.c @@ -27,7 +27,7 @@ #define SPK_TDM_RX_MASK 0x03 #define NUM_TDM_SLOTS 8 #define SLIM_MAX_TX_PORTS 16 -#define SLIM_MAX_RX_PORTS 16 +#define SLIM_MAX_RX_PORTS 13 #define WCD934X_DEFAULT_MCLK_RATE 9600000 struct sdm845_snd_data {