From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jirislaby@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
<linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] serial: 8250_mtk: correct max baud rate in the set_termios() method
Date: Sat, 20 Sep 2025 11:56:29 +0300 [thread overview]
Message-ID: <4be800b2-1c2b-4803-9cac-f3d0928a5975@omp.ru> (raw)
In-Reply-To: <bd8764c5-c43c-4bca-996d-65367805ad5a@omp.ru>
On 9/5/25 11:07 PM, Sergey Shtylyov wrote:
> As is obvious from the code calculating the divisor in the set_termios()
> method, the Mediatek UART driver uses 256-time oversampling for the high
> baud rates, so passing port->uartclk to uart_get_baud_rate() for the max
> acceptable baud rate makes no sense, we should divide by 256 first (this
Well, I thought again and 256 seems to be an overkill, I should probably
have reverted to division by 16 instead...
> should also prevent overflow when some arbitrary baud rate is passed via
> termios->c_ospeed)...
>
> Found by Linux Verification Center (linuxtesting.org) with the Svace static
> analysis tool.
>
> Fixes: 81bb549fdf14 ("serial: 8250_mtk: support big baud rate.")
> Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
[...]
MBR, Sergey
prev parent reply other threads:[~2025-09-20 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-05 20:07 Sergey Shtylyov
2025-09-20 8:56 ` Sergey Shtylyov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4be800b2-1c2b-4803-9cac-f3d0928a5975@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=angelogioacchino.delregno@collabora.com \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®