From: Dan Carpenter <dan.carpenter@oracle.com>
To: cascardo@linux.vnet.ibm.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
driverdev-devel@linuxdriverproject.org,
kernel-janitors@vger.kernel.org, linux-serial@vger.kernel.org
Subject: Re: [patch 2/2] serial: jsm: some off by one bugs
Date: Mon, 16 Mar 2015 18:38:33 +0000 [thread overview]
Message-ID: <20150316183833.GL10964@mwanda> (raw)
In-Reply-To: <20150316174743.GB6037@oc0812247204.ltc.br.ibm.com>
On Mon, Mar 16, 2015 at 02:47:43PM -0300, cascardo@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 ">=" instead of ">" so that we don't read one element past the end.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
> > index bfb0681..4eb12a9 100644
> > --- a/drivers/tty/serial/jsm/jsm_cls.c
> > +++ b/drivers/tty/serial/jsm/jsm_cls.c
> > @@ -570,7 +570,7 @@ static inline void cls_parse_isr(struct jsm_board *brd, uint port)
> > * verified in the interrupt routine.
> > */
> >
> > - if (port > brd->nasync)
> > + if (port >= brd->nasync)
> > return;
> >
> > ch = brd->channels[port];
> > diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
> > index 7291c21..f413ef0 100644
> > --- a/drivers/tty/serial/jsm/jsm_neo.c
> > +++ b/drivers/tty/serial/jsm/jsm_neo.c
>
> Hi, Dan.
>
> It looks like you missed the fix for neo_parse_isr.
>
> Would you send a v2 fixing that as well?
Yes. Thanks for catching this.
regards,
dan carpenter
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: cascardo@linux.vnet.ibm.com
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
kernel-janitors@vger.kernel.org,
driverdev-devel@linuxdriverproject.org,
Jiri Slaby <jslaby@suse.cz>,
linux-serial@vger.kernel.org
Subject: Re: [patch 2/2] serial: jsm: some off by one bugs
Date: Mon, 16 Mar 2015 21:38:33 +0300 [thread overview]
Message-ID: <20150316183833.GL10964@mwanda> (raw)
In-Reply-To: <20150316174743.GB6037@oc0812247204.ltc.br.ibm.com>
On Mon, Mar 16, 2015 at 02:47:43PM -0300, cascardo@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 ">=" instead of ">" so that we don't read one element past the end.
> >
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> >
> > diff --git a/drivers/tty/serial/jsm/jsm_cls.c b/drivers/tty/serial/jsm/jsm_cls.c
> > index bfb0681..4eb12a9 100644
> > --- a/drivers/tty/serial/jsm/jsm_cls.c
> > +++ b/drivers/tty/serial/jsm/jsm_cls.c
> > @@ -570,7 +570,7 @@ static inline void cls_parse_isr(struct jsm_board *brd, uint port)
> > * verified in the interrupt routine.
> > */
> >
> > - if (port > brd->nasync)
> > + if (port >= brd->nasync)
> > return;
> >
> > ch = brd->channels[port];
> > diff --git a/drivers/tty/serial/jsm/jsm_neo.c b/drivers/tty/serial/jsm/jsm_neo.c
> > index 7291c21..f413ef0 100644
> > --- a/drivers/tty/serial/jsm/jsm_neo.c
> > +++ b/drivers/tty/serial/jsm/jsm_neo.c
>
> Hi, Dan.
>
> It looks like you missed the fix for neo_parse_isr.
>
> Would you send a v2 fixing that as well?
Yes. Thanks for catching this.
regards,
dan carpenter
next prev parent reply other threads:[~2015-03-16 18:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 17:08 [patch 2/2] serial: jsm: some off by one bugs Dan Carpenter
2015-03-12 17:08 ` Dan Carpenter
2015-03-16 17:47 ` cascardo
2015-03-16 17:47 ` cascardo
2015-03-16 18:38 ` Dan Carpenter [this message]
2015-03-16 18:38 ` Dan Carpenter
2015-03-17 9:17 ` [patch 2/2 v2] " Dan Carpenter
2015-03-17 9:17 ` Dan Carpenter
2015-03-17 13:20 ` cascardo
2015-03-17 13:20 ` cascardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150316183833.GL10964@mwanda \
--to=dan.carpenter@oracle.com \
--cc=cascardo@linux.vnet.ibm.com \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.