From patchwork Fri Jul 13 15:30:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 141961 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp915441ljj; Sat, 14 Jul 2018 15:45:04 -0700 (PDT) X-Google-Smtp-Source: AAOMgpddrobX3nGl5xBeEFnSXzUiu+ucyx3GZajW96ehKZzh8SL+Zwr2FOUYyXDr/9JNPemqNc+k X-Received: by 2002:adf:e841:: with SMTP id d1-v6mr8368240wrn.269.1531608304456; Sat, 14 Jul 2018 15:45:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531608304; cv=none; d=google.com; s=arc-20160816; b=KrF+YtSpQnMRJj8nvS5zJvCzjL+r4CNBChGqM5yZXI9fYv2lyMp2gmrwDnwyw05oK3 EI/eZ9Y1hscI5eFsKnkzDriTV8VchtUgdWJfzMJ8mD9ynGpXNMhsmdhrys5LWYy+XETv GSGdu1RmcI4vb1suoAUQVZFv6iuf0aDs1b7GBlifxO+sXmcVHxqoXAM9RUgwyAQcd0om DA9OO8RT9zjSV4l9KezklCITdbYaUswWYJWSVZulh8XO4ov1FQlF6DbnYCnX6eWTXQhl QnFZ0Ou/ju5XxX0wNfcnaS0sHzojD10g7Mr/xXxjcN7UUxp9bmd/VpUJoHAEPKUjUV/s gPmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:date:message-id:in-reply-to:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=JQ5IUrk7yq+6SO7p6594BCUiK9m/03j81ft6vv9Cd3A=; b=Zh3ioS+yZSScLDq7MJzdVCF5bet4wr7vh2oC32e2TUAVUaGardNbapeOrfwANSG0kX /8o46eR/4re98O1vCJGoqLX+pXWm782P2PdkvYRu2dnrN3hWi1FjMpTbPoKdxGVKj+VF dBVB12TLJhyiVY/HJ7srixsWsqyl/4EPgB+VEDjbcgWRDG7xyVdsPhabUb6FVOUeszF+ uvURVwHsixSuyf6wMpX2mAlcSihssDAzuOnfPX4dhu+PPtHDedBPWfi+LznrUlUSIAyV /cl9lMOJU2ni1BN985p53ddDRfN1qZwnMgFEm94G1e2XBqvbWsRtN+F/QJkGuxpOhNAf w6RQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=UeHbuvUk; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from alsa0.perex.cz (alsa0.perex.cz. [77.48.224.243]) by mx.google.com with ESMTP id x10-v6si21169617wro.438.2018.07.14.15.45.04; Sat, 14 Jul 2018 15:45:04 -0700 (PDT) Received-SPF: pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) client-ip=77.48.224.243; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=UeHbuvUk; spf=pass (google.com: domain of alsa-devel-bounces@alsa-project.org designates 77.48.224.243 as permitted sender) smtp.mailfrom=alsa-devel-bounces@alsa-project.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 27D9B267770; Sun, 15 Jul 2018 00:44:37 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B963726773C; Sun, 15 Jul 2018 00:44:29 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.7 required=5.0 tests=DATE_IN_PAST_24_48, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=disabled version=3.4.0 Received: from heliosphere.sirena.org.uk (heliosphere.sirena.org.uk [172.104.155.198]) by alsa0.perex.cz (Postfix) with ESMTP id 0A130267730 for ; Sun, 15 Jul 2018 00:44:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=/Z5gC4ZtCR8l6iLE3bzfW+BknZ7AMjYldus3BwiJR6c=; b=UeHbuvUkuuED 1ijo+k7nXhfoJY0mVUV/HP8zXIg+Xg2Tx7yenduV9M2d+EF6rkqzSaS5fYYyNavIt8KlBqcMoJRjy hpN838IFgrEPn6BlYmSmjJRrIQPBLx0aPXt9PaQ/ghdhJWQe0C8NvDhiHE11o7yb+elROjDNf0U9D pyaVY=; Received: from host86-174-189-173.range86-174.btcentralplus.com ([86.174.189.173] helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1feTH6-0006hm-2q; Sat, 14 Jul 2018 22:44:24 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id 3EF2F440085; Fri, 13 Jul 2018 16:30:10 +0100 (BST) From: Mark Brown To: Dan Carpenter In-Reply-To: <20180713151100.x5usbqhlhrzjmeoq@kili.mountain> Message-Id: <20180713153010.3EF2F440085@finisterre.ee.mobilebroadband> Date: Fri, 13 Jul 2018 16:30:10 +0100 (BST) Cc: alsa-devel@alsa-project.org, Banajit Goswami , Patrick Lai , kernel-janitors@vger.kernel.org, Takashi Iwai , Liam Girdwood , Mark Brown , Srinivas Kandagatla , Niklas Cassel Subject: [alsa-devel] Applied "ASoC: qdsp6: q6routing: off by one in routing_hw_params()" to the asoc tree X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org The patch ASoC: qdsp6: q6routing: off by one in routing_hw_params() has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark >From 090345ce7265dd111299e3a63cdc79c3ef924481 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Fri, 13 Jul 2018 18:11:04 +0300 Subject: [PATCH] ASoC: qdsp6: q6routing: off by one in routing_hw_params() The data->port_data[] array has AFE_MAX_PORTS elements so the check should be >= instead of > or we write one element beyond the end of the array. Fixes: e3a33673e845 ("ASoC: qdsp6: q6routing: Add q6routing driver") Signed-off-by: Dan Carpenter Signed-off-by: Mark Brown --- sound/soc/qcom/qdsp6/q6routing.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.18.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel diff --git a/sound/soc/qcom/qdsp6/q6routing.c b/sound/soc/qcom/qdsp6/q6routing.c index 593f66b8622f..7a19d6278406 100644 --- a/sound/soc/qcom/qdsp6/q6routing.c +++ b/sound/soc/qcom/qdsp6/q6routing.c @@ -899,7 +899,7 @@ static int routing_hw_params(struct snd_pcm_substream *substream, else path_type = ADM_PATH_LIVE_REC; - if (be_id > AFE_MAX_PORTS) + if (be_id >= AFE_MAX_PORTS) return -EINVAL; session = &data->port_data[be_id];