Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp446529ybt; Wed, 24 Jun 2020 03:13:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1VsqSAPLxFZ3CyOmr4jDzMgcwOm7ObauhKtBZc5/xmsXhaNWTOV0yG2D43BfEx3UbUbwD X-Received: by 2002:a17:906:2e55:: with SMTP id r21mr23492856eji.338.1592993626181; Wed, 24 Jun 2020 03:13:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592993626; cv=none; d=google.com; s=arc-20160816; b=03InYdGUQNjtQyHQiHu+BR+ISwYv9rwRNnG1qNGyL8UFCEYHcjcIwOgQx7N+JpqDOy NWaqGSQt/rjoIt93h/PDRZSUdkmH7716jLtlnR82bvMl0GP5oQi8JVN2nw8ac+vTW6Lu nqKq2ArC2JLc4STD/owd4KUlXB0BK0zqzNxuDs94tXJgzZaUbj0f7tpF6vXqAxYEo2Si 89cWdmYk1yxA+eK5VrsiDMK2FrygY5P+BZ0q5snM44ddR/S58Kb85pHprK9lQzTSF2k7 ApxygqWkdXM+wsdqBUtYqbaBYfoF4aICwNNDEmYKZ8jUhwi7e/aR0LT3ByF9HiJSDLX8 dVLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=CAPw6B/7dc3m95BNPg8ApevjeXjORW/QuET2tU4Sf7Q=; b=JNTmvGW7oVTPwZ45soKzlkFrFSWxFOsSfwpwA9H26x9nt5nNKeZW6cJzbLtSmewHKS oSu0DvqEKMvTkow/+SBdRl+u4JorzfsTeS6tTz0i3Y/wWp67cZLwQk/yTOxN/2r6wUC8 rhvHadLrdDYe2QquZ7y9T/yRp/+AAl1MXxWRZ7JJlZnyf5iMUCmpvbfGW4ODDy2YYl88 +pI0q88hPxWsCzR72oLGbYou3Mc+sH13ZeOhgZYYwmmHgIIy4joZqV42VQ3frEpshV0A PGEDMxvtHAHK2jf1iQ3BMDNYULtTUoDPnNwxH5i0e4sXmtyJeb/BxFjUqwFQYd0ado1h ickA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb26si13216569edb.29.2020.06.24.03.13.19; Wed, 24 Jun 2020 03:13:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388581AbgFXKNI (ORCPT + 99 others); Wed, 24 Jun 2020 06:13:08 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:56628 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388095AbgFXKNI (ORCPT ); Wed, 24 Jun 2020 06:13:08 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jo2Os-0002ez-BZ; Wed, 24 Jun 2020 10:13:02 +0000 From: Colin King To: Ariel Elior , GR-everest-linux-l2@marvell.com, "David S . Miller" , Jakub Kicinski , Michal Kalderon , netdev@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] qed: add missing error test for DBG_STATUS_NO_MATCHING_FRAMING_MODE Date: Wed, 24 Jun 2020 11:13:02 +0100 Message-Id: <20200624101302.8316-1-colin.king@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King 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 --- drivers/net/ethernet/qlogic/qed/qed_debug.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c index 57a0dab88431..81e8fbe4a05b 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_debug.c +++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c @@ -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", -- 2.27.0