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 D9021A0C3F for ; Mon, 7 Jun 2021 23:17:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C790F410EA; Mon, 7 Jun 2021 23:17:55 +0200 (CEST) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by mails.dpdk.org (Postfix) with ESMTP id 968BE4068B for ; Mon, 7 Jun 2021 23:17:53 +0200 (CEST) Received: by mail-qk1-f177.google.com with SMTP id i68so14604274qke.3 for ; Mon, 07 Jun 2021 14:17:53 -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=wH4hlJZEjniuNm+Ujn5WGWWTfNMTCwlSClN6mlKHRLc=; b=IklK7Ymmj8uLe0DqS/BzfziZlVP7z8E9vZ0h/KNoJcgzI1j1FXfG9xXqj3RtUwig2t Af1tFf2DNoH5StR4ySA5C9ufz4y51IZZY7T4WM4CxpdOamXH0FLaigsCYw9TK1/LxXYS vfrZwpaN8S9NNzYp8HDXmq5PM+Gh9O85a5Md0= 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=wH4hlJZEjniuNm+Ujn5WGWWTfNMTCwlSClN6mlKHRLc=; b=s9kDNnJrLxakBbNowao3gBFo7Iesurn+SJuuISj1yWU4q9tR6XxE20erl/WpbWXblq E17OEMSlMLuKxkwMZz1XO52SVe0NutEM5BujHZJwL4O3IsDHF3sc8rOsD0psK50g4LbK 3+B933AHMQ9DkT8pIJvaOzseSNK1WeUNKcqgCEiJK0tP99H0yEuu8+PfKQT+S3wQ0apg oZ7XH0lG1x9Y7WBj64qYV0qr7g3RNzbKRXYi7Za59+OgEcaGgFCPBlsbAglr63gAh+4/ q9eyAQ2sWT4iBzJC33b6fLtyq3idE6AyUNkwzW2x9NqMU/32tTxJBuaj4YgOA5XaMQSG jnSQ== X-Gm-Message-State: AOAM532eItWPDmn7rEU3Pi5imYeey+UYFBSu8yd4iMlgwfRRdxpMtzuF JwEsquPsRA0Jaig5AlXxJVVURWLUgvch6ETzOWp8YkLIXCmS2Q== X-Google-Smtp-Source: ABdhPJw8YNbRN96LRPdku2Uc9S68AN8me2tZFe65Np0X1stugqyYzF4cMFQod5eHjzEGYDlaHR62wBl2KVkn3Z46Lz0= X-Received: by 2002:a37:d08:: with SMTP id 8mr3323208qkn.409.1623100672732; Mon, 07 Jun 2021 14:17:52 -0700 (PDT) MIME-Version: 1.0 References: <20210524090038.16580-1-thierry.herbelot@6wind.com> In-Reply-To: <20210524090038.16580-1-thierry.herbelot@6wind.com> From: Ajit Khaparde Date: Mon, 7 Jun 2021 14:17:36 -0700 Message-ID: To: Thierry Herbelot Cc: dpdk-dev , Thomas Monjalon , dpdk stable , Somnath Kotur Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000000e200f05c433938f" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-stable] [PATCH] net/bnxt: do not use possibly NULL pointers 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" --0000000000000e200f05c433938f Content-Type: text/plain; charset="UTF-8" On Mon, May 24, 2021 at 2:00 AM Thierry Herbelot wrote: > > Check that pointers are valid before using them. > > Fixes: 7bc8e9a227ccb ("net/bnxt: support async link notification") > Cc: stable@dpdk.org > Cc: Ajit Khaparde > Cc: Somnath Kotur > > Signed-off-by: Thierry Herbelot Modified the commit headline and applied to dpdk-next-net-brcm/for-next-net branch. Thanks > --- > drivers/net/bnxt/bnxt_irq.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/bnxt/bnxt_irq.c b/drivers/net/bnxt/bnxt_irq.c > index 8abbadb3d19d..fd8b8fac989a 100644 > --- a/drivers/net/bnxt/bnxt_irq.c > +++ b/drivers/net/bnxt/bnxt_irq.c > @@ -21,11 +21,14 @@ void bnxt_int_handler(void *param) > { > struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param; > struct bnxt *bp = eth_dev->data->dev_private; > - struct bnxt_cp_ring_info *cpr = bp->async_cp_ring; > + struct bnxt_cp_ring_info *cpr; > struct cmpl_base *cmp; > uint32_t raw_cons; > uint32_t cons; > > + if (bp == NULL) > + return; > + cpr = bp->async_cp_ring; > if (cpr == NULL) > return; > > -- > 2.29.2 > --0000000000000e200f05c433938f--