From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Kroah-Hartman Subject: Re: [PATCH resend 1/2] tty: omap-serial: fix division by zero Date: Thu, 25 Sep 2014 12:16:28 +0200 Message-ID: <20140925101628.GB16810@kroah.com> References: <20140924080852.GA28215@kroah.com> <1411636791-24116-1-git-send-email-frans.klaver@xsens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mail.linuxfoundation.org ([140.211.169.12]:58056 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750977AbaIYKRZ (ORCPT ); Thu, 25 Sep 2014 06:17:25 -0400 Content-Disposition: inline In-Reply-To: <1411636791-24116-1-git-send-email-frans.klaver@xsens.com> Sender: linux-serial-owner@vger.kernel.org List-Id: linux-serial@vger.kernel.org To: Frans Klaver Cc: stable@vger.kernel.org, Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org On Thu, Sep 25, 2014 at 11:19:51AM +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. > [] (unwind_backtrace) from [] (show_stack+0x10/0x14) > [] (show_stack) from [] (Ldiv0+0x8/0x10) > [] (Ldiv0) from [] (serial_omap_baud_is_mode16+0x4c/0x68) > [] (serial_omap_baud_is_mode16) from [] (serial_omap_set_termios+0x90/0x8d8) > [] (serial_omap_set_termios) from [] (uart_change_speed+0xa4/0xa8) > [] (uart_change_speed) from [] (uart_set_termios+0xa0/0x1fc) > [] (uart_set_termios) from [] (tty_set_termios+0x248/0x2c0) > [] (tty_set_termios) from [] (set_termios+0x248/0x29c) > [] (set_termios) from [] (tty_mode_ioctl+0x1c8/0x4e8) > [] (tty_mode_ioctl) from [] (tty_ioctl+0xa94/0xb18) > [] (tty_ioctl) from [] (do_vfs_ioctl+0x4a0/0x560) > [] (do_vfs_ioctl) from [] (SyS_ioctl+0x4c/0x74) > [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x30) > > Signed-off-by: Frans Klaver > --- > Resend to add stable@vger.kernel.org to CC. As far as I know, this applies to > v3.9 and up. This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly. I'll take care of this, but go read that file for your next time... greg k-h