diff options
| author | Dan Carpenter <[email protected]> | 2018-07-04 09:52:36 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2018-07-05 11:13:26 +0000 |
| commit | 0df8adbb88db8283f102a2afa91610a502245cb2 (patch) | |
| tree | 522453ecd9d4a4e7e4b09af8dc4370625bf8a646 /drivers/net/ethernet/qlogic/qed/qed_debug.c | |
| parent | qed: Fix reading stale configuration information (diff) | |
| download | kernel-0df8adbb88db8283f102a2afa91610a502245cb2.tar.gz kernel-0df8adbb88db8283f102a2afa91610a502245cb2.zip | |
qed: off by one in qed_parse_mcp_trace_buf()
If format_idx == s_mcp_trace_meta.formats_num then we read one element
beyond the end of the s_mcp_trace_meta.formats[] array.
Fixes: 50bc60cb155c ("qed*: Utilize FW 8.33.11.0")
Signed-off-by: Dan Carpenter <[email protected]>
Acked-by: Tomer Tayar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_debug.c')
| -rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c index a14e48489029..4340c4c90bcb 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_debug.c +++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c @@ -6723,7 +6723,7 @@ static enum dbg_status qed_parse_mcp_trace_buf(u8 *trace_buf, format_idx = header & MFW_TRACE_EVENTID_MASK; /* Skip message if its index doesn't exist in the meta data */ - if (format_idx > s_mcp_trace_meta.formats_num) { + if (format_idx >= s_mcp_trace_meta.formats_num) { u8 format_size = (u8)((header & MFW_TRACE_PRM_SIZE_MASK) >> MFW_TRACE_PRM_SIZE_SHIFT); |
