From: sashiko-bot@kernel.org
To: "Dan Carpenter" <dan@cryspen.com>
Cc: linux-serial@vger.kernel.org
Subject: Re: [PATCH] serial: amba-pl011: Fix divide by zero in pl011_console_get_options()
Date: Wed, 11 Nov 2026 09:29:42 +0000 [thread overview]
Message-ID: <sashiko-outbox-208698@kernel.org> (raw)
In-Reply-To: <6fdea544b2fb8f4226e296a952331cd42684474d.1794315353.git.dan@cryspen.com>
> When you boot QEMU with -kernel and don't set a baud rate the ibrd and
> fbrd values are zero and so clkdiv is also zero. It results in a divide
> by zero. Most of the time people don't notice because on
> qemu-system-arm64 when you divide by zero the result is zero and
> everything works. However, if you enable UBSAN, then the divide by zero
> leads to a crash and the boot fails.
>
> Return early when clkdev is zero. This leaves the baud rate set to its
> default value of 38400.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Dan Carpenter <dan@cryspen.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/6fdea544b2fb8f4226e296a952331cd42684474d.1794315353.git.dan@cryspen.com?part=1
next prev parent reply other threads:[~2026-11-11 9:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 9:23 [PATCH] serial: amba-pl011: Fix divide by zero in pl011_console_get_options() Dan Carpenter
2026-11-11 9:29 ` sashiko-bot [this message]
2026-11-12 8:08 ` Nicolai Buchwitz
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=sashiko-outbox-208698@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dan@cryspen.com \
--cc=linux-serial@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.