]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE
authorColin Ian King <colin.king@canonical.com>
Wed, 24 Jun 2020 10:13:02 +0000 (11:13 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 21:57:24 +0000 (14:57 -0700)
The error DBG_STATUS_NO_MATCHING_FRAMING_MODE was added to the enum
enum dbg_status however there is a missing corresponding entry for
this in the array s_status_str. This causes an out-of-bounds read when
indexing into the last entry of s_status_str.  Fix this by adding in
the missing entry.

Addresses-Coverity: ("Out-of-bounds read").
Fixes: 2d22bc8354b1 ("qed: FW 8.42.2.0 debug features")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_debug.c

index 57a0dab88431c0779f17a947610ed5c02bc86336..81e8fbe4a05bb58fcf7f05571d02ecbfe43a3e88 100644 (file)
@@ -5568,7 +5568,8 @@ static const char * const s_status_str[] = {
 
        /* DBG_STATUS_INVALID_FILTER_TRIGGER_DWORDS */
        "The filter/trigger constraint dword offsets are not enabled for recording",
-
+       /* DBG_STATUS_NO_MATCHING_FRAMING_MODE */
+       "No matching framing mode",
 
        /* DBG_STATUS_VFC_READ_ERROR */
        "Error reading from VFC",