summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
diff options
context:
space:
mode:
authorMichal Schmidt2013-07-01 17:23:06 +0200
committerDavid S. Miller2013-07-02 09:15:56 +0200
commit5bb680d6cbe36de9d7ba12b05f845c91a8692318 (patch)
tree5d9fc010a25a9cd1dfbff75e6b191e70e50005b3 /drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
parentbnx2x: remove zeroing of dump data buffer (diff)
downloadkernel-qcow2-linux-5bb680d6cbe36de9d7ba12b05f845c91a8692318.tar.gz
kernel-qcow2-linux-5bb680d6cbe36de9d7ba12b05f845c91a8692318.tar.xz
kernel-qcow2-linux-5bb680d6cbe36de9d7ba12b05f845c91a8692318.zip
bnx2x: fix dump flag handling
bnx2x interprets the dump flag as an index of a register preset. It is important to validate the index to avoid out of bounds memory accesses. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c')
-rw-r--r--drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 740518bbcb5f..15a528bda87c 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -11636,6 +11636,8 @@ static int bnx2x_init_bp(struct bnx2x *bp)
bp->min_msix_vec_cnt = 2;
BNX2X_DEV_INFO("bp->min_msix_vec_cnt %d", bp->min_msix_vec_cnt);
+ bp->dump_preset_idx = 1;
+
return rc;
}