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 1DA91A0C4C; Tue, 20 Jul 2021 23:35:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DC6B14068B; Tue, 20 Jul 2021 23:35:57 +0200 (CEST) Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by mails.dpdk.org (Postfix) with ESMTP id 50B0840689 for ; Tue, 20 Jul 2021 23:35:57 +0200 (CEST) Received: by mail-qt1-f175.google.com with SMTP id v14so576104qtc.8 for ; Tue, 20 Jul 2021 14:35:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=EK6aWmsFWu3VA8qehidooNoXvvvt8yphvBQdh6HXPwQ=; b=NWOR5mUgTQHzBemxT4HL7t1KrgIMNc5X9PXLV5gZtCHd6c182BEwLwQlzNyRHSVRMN o4k6IVzacNJAmFZYkT0szNMAuJRXD++e/Gz1aKcpPbFpstlzEcQsh4U/E1c/owPcdAv2 hjrRuzmxg3snoStEsBzzCbD/Khf9rucvE+JDU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=EK6aWmsFWu3VA8qehidooNoXvvvt8yphvBQdh6HXPwQ=; b=lCRGjX9WxsQ0yy/SIIq+Ip2H0Wnj9aPm4GAU5PRxH6YoPON3I7S98szC5lYmgDPJmO uxQDapEb673ElOPqf8wLoeeVXvpLUc8ADmW817BFproO45T0IYZzndOtmLQKPI/hBl1L sVCDYJple+JzdgxW2NWMwq4TtvcAnwbi63vL1sFzVevQ1DTIarALnlU4N0pDuF40mAll vXkz3EYVT6bpFzToyvAaYU3fVtm9FYGOUUA5k6mHJpHHIk84gaUUDu2Gt3CNFgrtryvN 40Evh1+0dfNqhohCIpiFW20nqaMXFJvA9kZ9BQrl6acZGRWb3j8pm2Hfx85eTRnoECin d7NA== X-Gm-Message-State: AOAM530nS6AGfTU0t0L/vRb224IiHz82Yl47RjKFioz2uAIGo2f3N8lx 2BPZRtVAQ6YWjSHBFilHmJGb9AefvZ9Bqn9uM0MQVg== X-Google-Smtp-Source: ABdhPJyNCc8rHk5iHNgVGZqUpGhTw2Ps045LSCOJ1k29YKixx9gNvGIaZq/fOjJNHo79No6NeisEezgSmYzwU6VIsi0= X-Received: by 2002:a05:622a:14ce:: with SMTP id u14mr28390978qtx.208.1626816956660; Tue, 20 Jul 2021 14:35:56 -0700 (PDT) MIME-Version: 1.0 References: <20210720162158.5883-1-kalesh-anakkur.purayil@broadcom.com> In-Reply-To: <20210720162158.5883-1-kalesh-anakkur.purayil@broadcom.com> From: Ajit Khaparde Date: Tue, 20 Jul 2021 14:35:40 -0700 Message-ID: To: Kalesh A P Cc: dpdk-dev Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000d525a305c794d6ae" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: fix null pointer dereferences X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" --000000000000d525a305c794d6ae Content-Type: text/plain; charset="UTF-8" On Tue, Jul 20, 2021 at 9:01 AM Kalesh A P < kalesh-anakkur.purayil@broadcom.com> wrote: > From: Kalesh AP > > 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") > Cc: stable@dpdk.org > > Signed-off-by: Kalesh AP > Reviewed-by: Ajit Khaparde > Reviewed-by: Lance Richardson > Patch applied to dpdk-next-net-brcm > --- > drivers/net/bnxt/bnxt_irq.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c > index ebdac83..122a1f9 100644 > --- a/drivers/net/bnxt/bnxt_irq.c > +++ b/drivers/net/bnxt/bnxt_irq.c > @@ -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) > 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.10.1 > > --000000000000d525a305c794d6ae--