From: Greg Kroah-Hartman Date: Fri, 30 Mar 2007 20:50:50 +0000 (-0700) Subject: one more patch added X-Git-Tag: v2.6.20.5~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7412e9c5fdd2ad8e4314f3c3bfcc5d1f4425262a;p=thirdparty%2Fkernel%2Fstable-queue.git one more patch added --- diff --git a/queue-2.6.20/generic_serial-fix-decoding-of-baud-rate.patch b/queue-2.6.20/generic_serial-fix-decoding-of-baud-rate.patch new file mode 100644 index 00000000000..019056e167c --- /dev/null +++ b/queue-2.6.20/generic_serial-fix-decoding-of-baud-rate.patch @@ -0,0 +1,51 @@ +From stable-bounces@linux.kernel.org Mon Mar 26 22:33:58 2007 +From: Daniel Drake +Date: Mon, 26 Mar 2007 21:32:15 -0800 +Subject: generic_serial: fix decoding of baud rate +To: torvalds@linux-foundation.org +Cc: dsd@gentoo.org, akpm@linux-foundation.org, rmk@arm.linux.org.uk, alan@lxorguk.ukuu.org.uk, stable@kernel.org +Message-ID: <200703270532.l2R5WFuw007779@shell0.pdx.osdl.net> + +From: Daniel Drake + +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 +Acked-by: Alan Cox +Cc: Russell King +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + 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; diff --git a/queue-2.6.20/series b/queue-2.6.20/series index 794eecd5659..0e5684b6be9 100644 --- a/queue-2.6.20/series +++ b/queue-2.6.20/series @@ -34,3 +34,4 @@ libata-clear-tf-before-identifying.patch libata-bugfix-hdio_drive_task.patch libata-sata_mv-don-t-touch-reserved-bits-in-edma-config-register.patch libata-sata_mv-fix-50xx-irq-mask.patch +generic_serial-fix-decoding-of-baud-rate.patch