lkml.org 
[lkml]   [2007]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 37/37] generic_serial: fix decoding of baud rate
    -stable review patch.  If anyone has any objections, please let us know.

    ------------------
    From: Daniel Drake <dsd@gentoo.org>

    Commit d720bc4b8fc5d6d179ef094908d4fbb5e436ffad partially removed a private
    implementation of baud speed decoding. However it doesn't seem to be
    complete: after the speed is decoded, it is still being used as an index to
    a local speed table (array overrun, no doubt).

    This was found by Graham Murray who noticed it caused a 2.6.19 regression
    with the SX driver: https://bugs.gentoo.org/170554

    Signed-off-by: Daniel Drake <dsd@gentoo.org>
    Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Russell King <rmk@arm.linux.org.uk>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    drivers/char/generic_serial.c | 7 -------
    1 file changed, 7 deletions(-)

    --- a/drivers/char/generic_serial.c
    +++ b/drivers/char/generic_serial.c
    @@ -711,12 +711,6 @@ void gs_close(struct tty_struct * tty, s
    }


    -static unsigned int gs_baudrates[] = {
    - 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200, 1800, 2400, 4800,
    - 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600
    -};
    -
    -
    void gs_set_termios (struct tty_struct * tty,
    struct ktermios * old_termios)
    {
    @@ -772,7 +766,6 @@ void gs_set_termios (struct tty_struct *

    baudrate = tty_get_baud_rate(tty);

    - baudrate = gs_baudrates[baudrate];
    if ((tiosp->c_cflag & CBAUD) == B38400) {
    if ( (port->flags & ASYNC_SPD_MASK) == ASYNC_SPD_HI)
    baudrate = 57600;
    --
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-03-30 23:17    [W:0.022 / U:29.904 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site