From: Dan Carpenter <error27@gmail.com>
To: Rasesh Mody <rmody@brocade.com>
Cc: Debashis Dutt <ddutt@brocade.com>,
"open list:BROCADE BNA 10 GI..." <netdev@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: [patch -next] bna: off by one in bfa_msgq_rspq_pi_update()
Date: Wed, 24 Aug 2011 14:30:28 +0300 [thread overview]
Message-ID: <20110824113028.GD5975@shale.localdomain> (raw)
The rspq->rsphdlr[] array has BFI_MC_MAX elements, so this test was
off by one.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/net/ethernet/brocade/bna/bfa_msgq.c b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
index ed52187..dd36427 100644
--- a/drivers/net/ethernet/brocade/bna/bfa_msgq.c
+++ b/drivers/net/ethernet/brocade/bna/bfa_msgq.c
@@ -483,7 +483,7 @@ bfa_msgq_rspq_pi_update(struct bfa_msgq_rspq *rspq, struct bfi_mbmsg *mb)
mc = msghdr->msg_class;
num_entries = ntohs(msghdr->num_entries);
- if ((mc > BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
+ if ((mc >= BFI_MC_MAX) || (rspq->rsphdlr[mc].cbfn == NULL))
break;
(rspq->rsphdlr[mc].cbfn)(rspq->rsphdlr[mc].cbarg, msghdr);
next reply other threads:[~2011-08-24 11:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 11:30 Dan Carpenter [this message]
2011-08-24 17:33 ` [patch -next] bna: off by one in bfa_msgq_rspq_pi_update() Rasesh Mody
2011-08-26 16:51 ` David Miller
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=20110824113028.GD5975@shale.localdomain \
--to=error27@gmail.com \
--cc=ddutt@brocade.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rmody@brocade.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox