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 55E96313298; Mon, 13 Apr 2026 16:53:50 +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=1776099230; cv=none; b=bYRuR77Lo8wWB22UKicQH5y/AccN00bHjW4/BLmPYM6BlYTb7bN6FhArqQVRn9TDXBPS6hkTJDzQ0tiTsykT5jRgfPQzynXmmAuIKO//WlR8dc4EtOzViMf3JHaPlB1Hh5syKy4z8umfoVmQTp1W5CLLEq3iMw+3qTk008wz86Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776099230; c=relaxed/simple; bh=98jo5flKW2ab7yLKTWvcD+iyGaFJkIelTm4nNorIbBM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=JmcpC7cPGefcyIrmzGl4yhWCXVgsyC5y7fT+oz49+SW/y7ZoYhVwQsUJcdEW7i9+fOwISO+ahGrvTDcchZ7Yg61yV4/cYkWBrnwxqrGisHCUX+64ZOVao8yX7DKk7hAdyiLzv/fn+x4HVE8Lyms7NPUSgGJuTRuzTpU0VUjKBvk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=M3haLS+e; 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="M3haLS+e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E1861C2BCAF; Mon, 13 Apr 2026 16:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1776099230; bh=98jo5flKW2ab7yLKTWvcD+iyGaFJkIelTm4nNorIbBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M3haLS+eyAB9w08xBGs1e5ncdBpX91/VmDz2pBFS67f+F7hhDub4Amqf1ejM4Po4n SHRkomm8C6sAmwSYm+eNuflnU2RXfkUvSn9/Hzxk4TRoiSHNFQT62FZWal8Pd8uqp3 V6SiyixZpARSlTQ+0/1jtvMmBrGKNJZGAKoVdDiI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Alok Tiwari , Lubomir Rintel , Randy Dunlap , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sasha Levin Subject: [PATCH 5.10 261/491] platform/olpc: olpc-xo175-ec: Fix overflow error message to print inlen Date: Mon, 13 Apr 2026 17:58:26 +0200 Message-ID: <20260413155828.823301717@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260413155819.042779211@linuxfoundation.org> References: <20260413155819.042779211@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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Alok Tiwari [ Upstream commit 2061f7b042f88d372cca79615f8425f3564c0b40 ] The command length check validates inlen (> 5), but the error message incorrectly printed resp_len. Print inlen so the log reflects the actual command length. Fixes: 0c3d931b3ab9e ("Platform: OLPC: Add XO-1.75 EC driver") Signed-off-by: Alok Tiwari Acked-by: Lubomir Rintel Reviewed-by: Randy Dunlap Link: https://patch.msgid.link/20260310130138.700687-1-alok.a.tiwari@oracle.com Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Signed-off-by: Sasha Levin --- drivers/platform/olpc/olpc-xo175-ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/olpc/olpc-xo175-ec.c b/drivers/platform/olpc/olpc-xo175-ec.c index 0d46706afd2da..d8a9a215a14cd 100644 --- a/drivers/platform/olpc/olpc-xo175-ec.c +++ b/drivers/platform/olpc/olpc-xo175-ec.c @@ -482,7 +482,7 @@ static int olpc_xo175_ec_cmd(u8 cmd, u8 *inbuf, size_t inlen, u8 *resp, dev_dbg(dev, "CMD %x, %zd bytes expected\n", cmd, resp_len); if (inlen > 5) { - dev_err(dev, "command len %zd too big!\n", resp_len); + dev_err(dev, "command len %zd too big!\n", inlen); return -EOVERFLOW; } -- 2.51.0