lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160102234908.GF2860@var.home>
Date:	Sun, 3 Jan 2016 00:49:08 +0100
From:	Samuel Thibault <samuel.thibault@...-lyon.org>
To:	William Hubbs <w.d.hubbs@...il.com>,
	Chris Brannon <chris@...-brannons.com>,
	Kirk Reiser <kirk@...sers.ca>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	speakup@...ux-speakup.org, devel@...verdev.osuosl.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Staging: speakup: Fix getting port information

Samuel Thibault, on Sun 03 Jan 2016 00:25:29 +0100, wrote:
> 5e6dc54 broke the port information in the speakup driver:
> SERIAL_PORT_DFNS only gets defined if asm/serial.h is included.
> 
> Along the way, make sure that we do have information for the requested
> serial port number (index)

(It'd be good to get this into 4.4 and 4.3.4).

> Signed-off-by: Samuel Thibault <samuel.thibault@...-lyon.org>
> 
> --- a/drivers/staging/speakup/serialio.c
> +++ b/drivers/staging/speakup/serialio.c
> @@ -6,6 +6,9 @@
>  #include "spk_priv.h"
>  #include "serialio.h"
>  
> +#include <linux/serial_core.h>
> +#include <asm/serial.h>
> +
>  #ifndef SERIAL_PORT_DFNS
>  #define SERIAL_PORT_DFNS
>  #endif
> @@ -26,6 +29,11 @@ const struct old_serial_port *spk_serial
>  	const struct old_serial_port *ser = rs_table + index;
>  	int err;
>  
> +	if (index > sizeof(rs_table) / sizeof(*rs_table)) {
> +		pr_info("no port info for ttyS%d\n", index);
> +		return NULL;
> +	}
> +
>  	/*	Divisor, bytesize and parity */
>  	quot = ser->baud_base / baud;
>  	cval = cflag & (CSIZE | CSTOPB);

-- 
Samuel
AUTHOR
     FvwmM4 is the result of a random  bit  mutation  on  a  hard
     disk,  presumably  a  result  of  a  cosmic-ray or some such
     thing.
(extrait de la page de man de FvwmM4)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ