* [patch] skd: wrong limiter in skd_acquire_msix()
@ 2013-11-29 8:16 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2013-11-29 8:16 UTC (permalink / raw)
To: Jens Axboe
Cc: Bartlomiej Zolnierkiewicz, Kyungmin Park, Akhil Bhansali,
rchinthekindi, Mike Snitzer, Wei Yongjun, linux-kernel,
kernel-janitors
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,
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-11-29 8:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-29 8:16 [patch] skd: wrong limiter in skd_acquire_msix() Dan Carpenter
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®