linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Frans Klaver <frans.klaver@xsens.com>
Cc: Jiri Slaby <jslaby@suse.cz>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-omap@vger.kernel.org
Subject: Re: [PATCH 1/2] tty: omap-serial: fix division by zero
Date: Wed, 24 Sep 2014 01:08:52 -0700	[thread overview]
Message-ID: <20140924080852.GA28215@kroah.com> (raw)
In-Reply-To: <1411545322-22940-2-git-send-email-frans.klaver@xsens.com>

On Wed, Sep 24, 2014 at 09:55:21AM +0200, Frans Klaver wrote:
> If the chosen baud rate is large enough (e.g. 3.5 megabaud), the
> calculated n values in serial_omap_is_baud_mode16() may become 0. This
> causes a division by zero when calculating the difference between
> calculated and desired baud rates. To prevent this, cap the n13 and n16
> values on 1.
> 
> Division by zero in kernel.
> [<c00132e0>] (unwind_backtrace) from [<c00112ec>] (show_stack+0x10/0x14)
> [<c00112ec>] (show_stack) from [<c01ed7bc>] (Ldiv0+0x8/0x10)
> [<c01ed7bc>] (Ldiv0) from [<c023805c>] (serial_omap_baud_is_mode16+0x4c/0x68)
> [<c023805c>] (serial_omap_baud_is_mode16) from [<c02396b4>] (serial_omap_set_termios+0x90/0x8d8)
> [<c02396b4>] (serial_omap_set_termios) from [<c0230a0c>] (uart_change_speed+0xa4/0xa8)
> [<c0230a0c>] (uart_change_speed) from [<c0231798>] (uart_set_termios+0xa0/0x1fc)
> [<c0231798>] (uart_set_termios) from [<c022bb44>] (tty_set_termios+0x248/0x2c0)
> [<c022bb44>] (tty_set_termios) from [<c022c17c>] (set_termios+0x248/0x29c)
> [<c022c17c>] (set_termios) from [<c022c3e4>] (tty_mode_ioctl+0x1c8/0x4e8)
> [<c022c3e4>] (tty_mode_ioctl) from [<c0227e70>] (tty_ioctl+0xa94/0xb18)
> [<c0227e70>] (tty_ioctl) from [<c00cf45c>] (do_vfs_ioctl+0x4a0/0x560)
> [<c00cf45c>] (do_vfs_ioctl) from [<c00cf568>] (SyS_ioctl+0x4c/0x74)
> [<c00cf568>] (SyS_ioctl) from [<c000e480>] (ret_fast_syscall+0x0/0x30)
> 
> Signed-off-by: Frans Klaver <frans.klaver@xsens.com>
> ---
>  drivers/tty/serial/omap-serial.c | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)

Should this go to the stable kernel trees as well?

thanks,

greg k-h

  reply	other threads:[~2014-09-24  8:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-23 19:54 [PATCH 0/2] Fix a division by zero Frans Klaver
2014-09-23 19:54 ` [PATCH 1/2] tty: omap-serial: pull out calculation from baud_is_mode16 Frans Klaver
2014-09-23 19:54 ` [PATCH 2/2] tty: omap-serial: fix a division by zero Frans Klaver
2014-09-23 21:58 ` [PATCH 0/2] Fix " Greg Kroah-Hartman
2014-09-24  7:55   ` [PATCH v2 0/2] Frans Klaver
2014-09-24  7:55     ` [PATCH 1/2] tty: omap-serial: fix division by zero Frans Klaver
2014-09-24  8:08       ` Greg Kroah-Hartman [this message]
2014-09-24  8:41         ` Frans Klaver
2014-09-24  9:09           ` Frans Klaver
2014-09-25  9:19         ` [PATCH resend " Frans Klaver
2014-09-25 10:16           ` Greg Kroah-Hartman
2014-09-25 10:24             ` Frans Klaver
2014-09-24  7:55     ` [PATCH 2/2] tty: omap-serial: pull out calculation from baud_is_mode16 Frans Klaver

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=20140924080852.GA28215@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=frans.klaver@xsens.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).