Re: [patch 2/2] serial: jsm: some off by one bugs

2015-03-16 Thread Dan Carpenter
On Mon, Mar 16, 2015 at 02:47:43PM -0300, casca...@linux.vnet.ibm.com wrote: > On Thu, Mar 12, 2015 at 08:08:24PM +0300, Dan Carpenter wrote: > > "brd->nasync" amd "brd->maxports" are the same. They hold the number of > > filled out channels in the brd->channels[] array. These tests should > > be

Re: [patch 2/2] serial: jsm: some off by one bugs

2015-03-16 Thread cascardo
On Thu, Mar 12, 2015 at 08:08:24PM +0300, Dan Carpenter wrote: > "brd->nasync" amd "brd->maxports" are the same. They hold the number of > filled out channels in the brd->channels[] array. These tests should > be ">=" instead of ">" so that we don't read one element past the end. > > Signed-off-

[patch 2/2] serial: jsm: some off by one bugs

2015-03-12 Thread Dan Carpenter
"brd->nasync" amd "brd->maxports" are the same. They hold the number of filled out channels in the brd->channels[] array. These tests should be ">=" instead of ">" so that we don't read one element past the end. Signed-off-by: Dan Carpenter diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drive