From: Dan Carpenter <dan.carpenter@oracle.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Akhil Bhansali <bhansaliakhil@gmail.com>,
rchinthekindi <rchinthekindi@stec-inc.com>,
Mike Snitzer <snitzer@redhat.com>,
Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] skd: wrong limiter in skd_acquire_msix()
Date: Fri, 29 Nov 2013 11:16:47 +0300 [thread overview]
Message-ID: <20131129081646.GB3490@elgon.mountain> (raw)
On some paths, there can be fewer than SKD_MAX_MSIX_COUNT (13) elements
in the skdev->msix_entries[] array so we would be going past the end of
the array.
Fixes: e67f86b31ae5 ('Add support for sTec's pci-e flash card Kronos')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Static checker stuff. Compile tested only.
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 9199c93be926..d0f3e4e81cc5 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -3989,7 +3989,7 @@ static int skd_acquire_msix(struct skd_device *skdev)
}
/* Enable MSI-X vectors for the base queue */
- for (i = 0; i < SKD_MAX_MSIX_COUNT; i++) {
+ for (i = 0; i < skdev->msix_count; i++) {
qentry = &skdev->msix_entries[i];
snprintf(qentry->isr_name, sizeof(qentry->isr_name),
"%s%d-msix %s", DRV_NAME, skdev->devno,
reply other threads:[~2013-11-29 8:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20131129081646.GB3490@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=axboe@kernel.dk \
--cc=b.zolnierkie@samsung.com \
--cc=bhansaliakhil@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rchinthekindi@stec-inc.com \
--cc=snitzer@redhat.com \
--cc=yongjun_wei@trendmicro.com.cn \
/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
all inboxes | Powered by JetHome®