mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
qla2x00t-32gbit: Add a runtime array bounds check
Complain if the msix_entries[] array is accessed outside its bounds. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8164 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -3614,6 +3614,7 @@ msix_failed:
|
||||
|
||||
/* Enable MSI-X vectors for the base queue */
|
||||
for (i = 0; i < QLA_BASE_VECTORS; i++) {
|
||||
WARN(i >= ha->msix_count, "%d > %d\n", i, ha->msix_count);
|
||||
qentry = &ha->msix_entries[i];
|
||||
qentry->handle = rsp;
|
||||
rsp->msix = qentry;
|
||||
@@ -3639,6 +3640,8 @@ msix_failed:
|
||||
*/
|
||||
if (QLA_TGT_MODE_ENABLED() && (ql2xenablemsix != 0) &&
|
||||
IS_ATIO_MSIX_CAPABLE(ha)) {
|
||||
WARN(QLA_ATIO_VECTOR >= ha->msix_count, "%d > %d\n",
|
||||
QLA_ATIO_VECTOR, ha->msix_count);
|
||||
qentry = &ha->msix_entries[QLA_ATIO_VECTOR];
|
||||
rsp->msix = qentry;
|
||||
qentry->handle = rsp;
|
||||
|
||||
Reference in New Issue
Block a user