Skip to content

Commit

Permalink
qed: Correct out-of-bound access in OOO history
Browse files Browse the repository at this point in the history
Need to set the number of entries in database, otherwise the logic
would quickly surpass the array.

Fixes: 1d6cff4 ("qed: Add iSCSI out of order packet handling")
Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Mintz, Yuval authored and davem330 committed Mar 14, 2017
1 parent 1df2ade commit db31d33
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/qlogic/qed/qed_ooo.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ struct qed_ooo_info *qed_ooo_alloc(struct qed_hwfn *p_hwfn)
if (!p_ooo_info->ooo_history.p_cqes)
goto no_history_mem;

p_ooo_info->ooo_history.num_of_cqes = QED_MAX_NUM_OOO_HISTORY_ENTRIES;

return p_ooo_info;

no_history_mem:
Expand Down

0 comments on commit db31d33

Please sign in to comment.