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 62A4DA034F; 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 D47854068B; Mon, 7 Jun 2021 23:17:54 +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 9517D4067E for ; Mon, 7 Jun 2021 23:17:53 +0200 (CEST) Received: by mail-qk1-f177.google.com with SMTP id k4so18245862qkd.0 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=TAiXxdKFjU9K0VbbeR5gBSsNPhioLLJG84V4XGMsgsE=; b=PU0XDOoCdmdrnqnDlktL77/Rcclres6kCjVCjJwTcAVz5vurvIHyCornbvQ+Eg50+s ULNCTmBW0GBhDJKmNl56Q5f3YIKC33TXKrVO3JN4tvnq9NUYp5Z70WNkmNi/8OXJlq5/ PfvxKwD9FhOZIaI0jTTNC+JWazeP4TOTTL2ok= 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=TAiXxdKFjU9K0VbbeR5gBSsNPhioLLJG84V4XGMsgsE=; b=e64Zibclq7ZJ8to3YSqhH6nY0puZu6OFE7xhExHaKJJCFz/JYtYu6na5x/iH/LvTsl FIlWwqVoy/HXg6s+UUOzM63PERVWuSqKRRKlZ925V5V2xRJP/RTuyqqeklR1CIVqkEjC y+q4wHocJJNCSLE/6s/pVUC6NPNrJd//uTk4fg+ruf00LXVZYDD9onhX3uKzmVzwadi8 Lw796QJ1+IyYA+N0X+tgArG5toVh6LUvsGrmpcvTuOim9X99CxWspOtujqefXt8ACTw9 vQ0WpX6pn5Y+FwZSfm+plDyEUVWezuFaCMt+C4IAbxFCGjQvrr2QQuNnLMVXu2AhXkNz qqkA== X-Gm-Message-State: AOAM531aka/sGJrVT5wwrQC69vdXIgKeazHGb4T9Y+XOhPnDXJ80VHSd mKiLHda79Z6ReLmo5ZkaCimKlG2oLgdQk17wFUafMQ== 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="0000000000000e289205c43393a2" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [dpdk-dev] [PATCH] net/bnxt: do not use possibly NULL pointers 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" --0000000000000e289205c43393a2 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 > --0000000000000e289205c43393a2--