From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DE0B3FADEE; Tue, 31 Mar 2026 16:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976019; cv=none; b=ToSznZ3P57aj166CkDp/coZfa5rGa9qlFFYOSnn8TJ41ZSpUtd5cmMfSyFeJ+P9x9nPI0v5tbADzb6N0MLzKhzTlppFZ8adIj8vENHGTeFogdiJWjIskIe/HkgS8zYwFqwkN5YCo/Snkrm93OUOp6tJTM6kA80s0ajz/pf8b6eo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774976019; c=relaxed/simple; bh=vmmEcOZV3NkabqPekA+vGCUS/tqM0zN8oH4EH7HwVxU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fj13sIjNhtxqLMqekqkkutJs4MN/2DxcoQkaKnRDvwfkJXRPeLw6kQnkz9jQ0xNQsQEeuHAzS4eRjO3CJVz0Ho2jTNdgFPjNkkgoYnVOnO9Bqb+GuKzbw62LuZ0ky+gqlfnYXKo0iXVvz0fQrdzXOmip7n2RY/Z2vBFvzb4F7/Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ImJHnVGn; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ImJHnVGn" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9847AC19423; Tue, 31 Mar 2026 16:53:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774976018; bh=vmmEcOZV3NkabqPekA+vGCUS/tqM0zN8oH4EH7HwVxU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ImJHnVGnJ0epghlKeHrDFuVjQXcXod2c5DEUWz//RD5looz+5CFxeKQtWnBUbFtvF Z1Y7pnGvWFCgSXw2ZHJvSAGHX8WTYnW/YFPKZkELFPHVN8xDP9hdKi4wuhb+wCQczU 9aQLJOUxq/KV0eCVeiZ0jxVocV2jJGONeaacZauo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Peter Ujfalusi , Bard Liao , Liam Girdwood , Seppo Ingalsuo , Kai Vehmanen , Mark Brown Subject: [PATCH 6.12 143/244] ASoC: SOF: ipc4-topology: Allow bytes controls without initial payload Date: Tue, 31 Mar 2026 18:21:33 +0200 Message-ID: <20260331161747.048286713@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260331161741.651718120@linuxfoundation.org> References: <20260331161741.651718120@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Peter Ujfalusi commit d40a198e2b7821197c5c77b89d0130cc90f400f5 upstream. It is unexpected, but allowed to have no initial payload for a bytes control and the code is prepared to handle this case, but the size check missed this corner case. Update the check for minimal size to allow the initial size to be 0. Cc: stable@vger.kernel.org Fixes: a653820700b8 ("ASoC: SOF: ipc4-topology: Correct the allocation size for bytes controls") Signed-off-by: Peter Ujfalusi Reviewed-by: Bard Liao Reviewed-by: Liam Girdwood Reviewed-by: Seppo Ingalsuo Reviewed-by: Kai Vehmanen Link: https://patch.msgid.link/20260326075618.1603-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/sof/ipc4-topology.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/sound/soc/sof/ipc4-topology.c +++ b/sound/soc/sof/ipc4-topology.c @@ -2527,7 +2527,7 @@ static int sof_ipc4_control_load_bytes(s return -EINVAL; } - if (scontrol->priv_size < sizeof(struct sof_abi_hdr)) { + if (scontrol->priv_size && scontrol->priv_size < sizeof(struct sof_abi_hdr)) { dev_err(sdev->dev, "bytes control %s initial data size %zu is insufficient.\n", scontrol->name, scontrol->priv_size);