From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=162.243.120.170 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796230646; b=SpWT4ShT9pP+3mIY6M02ALv/RuOMSCHeQpoAgEC9f/4a3pBwKUS26zZgAqQOmcdioHBR 3O4IULwDluQkMVLXIhOPIg5sNaIcyRRpu1+XjeJu+H5Ttf9me/xYwLYLsTWomy30KA+vM XHPHRX5euIvoaUstqrhDm8k3/yKwz5ElbuT9u9nnxZ65sncAbnwd1gZclecoCp86LO2yC qGXI123Zx/xr3ohAmb9r6qVAgmp+RAPqwQe+XDwlxE0twGhWGLr+zJRGk4p5JBo7TaIqI ZlE61F6vhfrI3DUfL1B21eNmOhv6hU+a4aHvaB4S96Jnk5SeB9B7T8nUioE+xesx/kg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796230646; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-Spam_score:X-Spam_bar; bh=Pl+q77K+1CKOox5dcbscfyF0rn5bVOdZ4xMWPEp1G2Y=; b=nDMo9bLII5wrIApt7zcmmhIMJGUEYYIl5wISY8t2iOpvw0ptiTbMNrGG9SI9exOkMQX8 cOrhfWQZ8xzD7ws6BsWdWBi/0AAznaP1uOHk++thyeDXTLLjqjXi9rh9WaviY7umukKah c/b6nIWbcpl8pwRYkL0GhKQp0dSSYeLAidnb6jTBI2ll+zMtY3KRt4PFohzSaBA73vEMs vqdCPr/y0qeDJ1OzvMSlhV3puYiwk0azRRU1zOinAdxITy+IQT2+qBJMTGA6tAbGuKAMp Gik5J40edPnx4n12+0c0wNDiP4UErK7sIa+Srk5BaSC9CmmvNrJh02Z3OG+qmCths8w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=hugovil.com; spf=pass smtp.mailfrom=hugovil.com; dkim=pass header.d=hugovil.com header.i=@hugovil.com header.a=rsa-sha256 header.s=default header.b=UTTCnBBI; arc=none smtp.remote-ip=162.243.120.170 Received: from mail.hugovil.com (mail.hugovil.com [162.243.120.170]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 38D77606A31A; Wed, 2 Dec 2026 16:57:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 38D77606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=hugovil.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hugovil.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=hugovil.com header.i=@hugovil.com header.a=rsa-sha256 header.s=default header.b=UTTCnBBI DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=hugovil.com ; s=default; h=Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject :Cc:To:From:subject:date:message-id:reply-to; bh=Pl+q77K+1CKOox5dcbscfyF0rn5bVOdZ4xMWPEp1G2Y=; b=UTTCnBBIh9vIkGzuXQgcv+kSce GMd+uxAVl0P4b16TqPv3fOxLPYhJP0zt/6en6wDotnRdsc2dKyeZdr6w9dqyKxyYaKKKfrkTkM2di BDjLrHqkwKNoErhpEuUhMTtAZg/paZoVInAqHPyEd/DLYRmV25ET5UmKhtwO9FMf1v8M=; Received: from modemcable168.174-80-70.mc.videotron.ca ([70.80.174.168] helo=localhost.localdomain) by mail.hugovil.com with esmtpa (Exim 4.98.2) (envelope-from ) id 1xYne0-000000003oi-2cjg; Wed, 02 Dec 2026 11:57:24 -0500 From: Hugo Villeneuve To: Greg Kroah-Hartman , Jiri Slaby Cc: Hugo Villeneuve , stable@vger.kernel.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH] serial: icom: fix off-by-one in baud rate table lookup Date: Wed, 2 Dec 2026 11:56:53 -0500 Message-ID: <20261202165708.36577-1-hugo@hugovil.com> X-Mailer: git-send-email 2.47.3 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam_score: -1.0 X-Spam_bar: - The lookup loop only test indices 0 to BAUD_TABLE_LIMIT - 1, leaving the last entry 460800 unreachable. Requesting exactly that rate always falls through with new_config3 left at its initializer 0, silently programming the hardware for 300 baud instead. Fix the loop bound to include the last table entry. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Hugo Villeneuve --- drivers/tty/serial/icom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c index b6399d86a0bc3..e594fc6b655f5 100644 --- a/drivers/tty/serial/icom.c +++ b/drivers/tty/serial/icom.c @@ -1397,7 +1397,7 @@ static void icom_set_termios(struct uart_port *port, struct ktermios *termios, icom_acfg_baud[0], icom_acfg_baud[BAUD_TABLE_LIMIT]); - for (index = 0; index < BAUD_TABLE_LIMIT; index++) { + for (index = 0; index <= BAUD_TABLE_LIMIT; index++) { if (icom_acfg_baud[index] == baud) { new_config3 = index; break; base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244 -- 2.47.3