From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CD20AA0C47 for ; Tue, 10 Aug 2021 17:44:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C7B6C40686; Tue, 10 Aug 2021 17:44:29 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) by mails.dpdk.org (Postfix) with ESMTP id 783994114F for ; Tue, 10 Aug 2021 17:44:28 +0200 (CEST) Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id 5C4C83F361 for ; Tue, 10 Aug 2021 15:44:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1628610268; bh=u+3/GArGNM4m7SOzFyH6EUwqKNFg1wAxWfe0Qm/5x2Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=vlm76JBuB/EEaqMI1k3MUKPY9qMVomqSJMx9funrMAmQM2iYdnvhHnNzfpJzpWGoE dqZPv3UItnKFNoG4Viyfq5xW0MOh92KWote/rPxlezC+5FBjbbN4bW3b4cjIKj7/zc xeUXslupOV3GuvgcHK/AIhTn8lk5sKaw4F7c2PiccEFaJUUx4s5DMOs2DmhrM9rIyW DKiCvX1msy4vjsynbVQC8FNjdwrpZilm5GlOlp5del3reyU4ngoCLOAmyPDXhPXi6G Bk3z2UEKp2oFfYWgm3FyEuaCokkr0S4uIUNJ1CWYamRCWn8S3WtCTdHEPZXS06ZaAv uCsUMQFKvyeYQ== Received: by mail-ed1-f72.google.com with SMTP id eg56-20020a05640228b8b02903be79801f9aso1439762edb.21 for ; Tue, 10 Aug 2021 08:44:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=u+3/GArGNM4m7SOzFyH6EUwqKNFg1wAxWfe0Qm/5x2Q=; b=rkKVZgtDDvlszCepQcmPVc3NN2UJomG523Fj7l5Egi6DEhDsySSDJ21OQr4ggvjAoh cDLabeBjUF9wxFxIB7esiuD39TeYKvkzaw8YW+pcSV8ABrgAywMg4mcmiQ3QadIfGBLs FNkH4SnbNR8NRudkI3hK0fLhq+i28Cmw6seIIGDNwcsATE855ImMZz87rZCubuKjQ/ub VAZ0jHMJFSQ47pf76om2NLq5p1EFOmDZA5G4ACF2+Tan58qSY9oRwS/ARAuMaQxKZUcP +BoCSKyGL0le3qY/v70txvVqyTbSZe336RvZMFoLHqxEFKeNqhMPDGIKOQmpjePrekGV /wGQ== X-Gm-Message-State: AOAM532kYAhNv6KgB/gaWRYy7NTDvzaUyu9Nw/gjBvV0lfTlHipF0yd/ NEKR71BIjy8Z2HBwi4IKA1vftIwkwwsWiEZe1q4SGCgCVXSDwhy4fnK8h0CMngNBhzFzQQC88d5 qgP4UdXmKv8Lp8/m7MEW5792n X-Received: by 2002:aa7:c844:: with SMTP id g4mr5128334edt.123.1628610267407; Tue, 10 Aug 2021 08:44:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyp3NIP0OGi0HUDPaAnxgojTk3Uhvw2QFtw2F9F2UOy+/iLIBJC1dwmhNDQRXb/ZQLjG0GEdg== X-Received: by 2002:aa7:c844:: with SMTP id g4mr5128311edt.123.1628610267171; Tue, 10 Aug 2021 08:44:27 -0700 (PDT) Received: from Keschdeichel.fritz.box ([2001:67c:1560:8007::aac:c4ad]) by smtp.gmail.com with ESMTPSA id t9sm9371640edd.33.2021.08.10.08.44.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Aug 2021 08:44:26 -0700 (PDT) From: christian.ehrhardt@canonical.com To: Kalesh AP Cc: Ajit Khaparde , Lance Richardson , dpdk stable Date: Tue, 10 Aug 2021 17:39:58 +0200 Message-Id: <20210810154022.749358-78-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810154022.749358-1-christian.ehrhardt@canonical.com> References: <20210810154022.749358-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/bnxt: fix null dereference in interrupt handler' has been queued to stable release 19.11.10 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/12/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/8945c5a358b46e2351289050d4c1df982e76c95c Thanks. Christian Ehrhardt --- >From 8945c5a358b46e2351289050d4c1df982e76c95c Mon Sep 17 00:00:00 2001 From: Kalesh AP Date: Tue, 20 Jul 2021 21:51:58 +0530 Subject: [PATCH] net/bnxt: fix null dereference in interrupt handler [ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ] Coverity reports that pointer "cpr->cp_ring_struct" may be dereferenced with null value. This patch fixes this. Coverity issue: 372063 Fixes: 5ed30db87fa8 ("net/bnxt: fix missing barriers in completion handling") Signed-off-by: Kalesh AP Reviewed-by: Ajit Khaparde Reviewed-by: Lance Richardson --- drivers/net/bnxt/bnxt_irq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c index 93779f4e0c..1f33429116 100644 --- a/drivers/net/bnxt/bnxt_irq.c +++ b/drivers/net/bnxt/bnxt_irq.c @@ -45,6 +45,7 @@ void bnxt_int_handler(void *param) return; } + cp_ring_size = cpr->cp_ring_struct->ring_size; cons = RING_CMP(cpr->cp_ring_struct, raw_cons); cmp = &cpr->cp_desc_ring[cons]; -- 2.32.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-08-10 15:11:16.029545681 +0200 +++ 0078-net-bnxt-fix-null-dereference-in-interrupt-handler.patch 2021-08-10 15:11:13.090638619 +0200 @@ -1 +1 @@ -From 3f44ec48c733f7d7607877164c9aa0305de9cecd Mon Sep 17 00:00:00 2001 +From 8945c5a358b46e2351289050d4c1df982e76c95c Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 3f44ec48c733f7d7607877164c9aa0305de9cecd ] + @@ -11 +12,0 @@ -Cc: stable@dpdk.org @@ -17,2 +18,2 @@ - drivers/net/bnxt/bnxt_irq.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + drivers/net/bnxt/bnxt_irq.c | 1 + + 1 file changed, 1 insertion(+) @@ -21 +22 @@ -index ebdac8385d..122a1f9908 100644 +index 93779f4e0c..1f33429116 100644 @@ -24,9 +25 @@ -@@ -33,7 +33,6 @@ void bnxt_int_handler(void *param) - return; - - raw_cons = cpr->cp_raw_cons; -- cp_ring_size = cpr->cp_ring_struct->ring_size; - pthread_mutex_lock(&bp->def_cp_lock); - while (1) { - if (!cpr || !cpr->cp_ring_struct || !cpr->cp_db.doorbell) { -@@ -46,6 +45,7 @@ void bnxt_int_handler(void *param) +@@ -45,6 +45,7 @@ void bnxt_int_handler(void *param)