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 69E1BA00C3 for ; Mon, 2 May 2022 18:59:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C51341614; Mon, 2 May 2022 18:59:57 +0200 (CEST) Received: from mail-io1-f51.google.com (mail-io1-f51.google.com [209.85.166.51]) by mails.dpdk.org (Postfix) with ESMTP id B94BA40E28; Mon, 2 May 2022 18:59:54 +0200 (CEST) Received: by mail-io1-f51.google.com with SMTP id f4so16618917iov.2; Mon, 02 May 2022 09:59:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=oS+8OX8avkyEq/+Dr6LAbH1ExVsHcxmACgqIph14vn0=; b=X2/RTKTqEk8/cNtc8HJ1qA3PcVlKzTR6WJ7kA9m3R20uU8Ovo3Miabek9AOY5QJEHo XLNZqWyUek2THXKIoJKOF3SD12Z2tmk1Fg4eTkEWsiT2qRqkCGygOnxLQTkrtxiw5yyb LpwPa+/mJz1g114awYvLuv7Q4rS3l3cx9utyrgXTrlwsRfnyfE2HC7aRxyldVBOpVJ2G sMjWzFjj5WyjD0me5q6ym83QGsGkgeZlFEMUDXMUdTB/16elpBZTfX7G7ff/+Ii0OZRk AGlIkfS3sdGHZpnXMm/ziUJLruMpZHkC/z3X0muC5kGpYlwIS1iRj77YYkIC8+aZbLP3 CqrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=oS+8OX8avkyEq/+Dr6LAbH1ExVsHcxmACgqIph14vn0=; b=PvUly++UzLUstNRe/qrMBGTFBuuff97ZhJym2vjv/0FxTt3jfBsE9F1O2COsuo7HQx qE0fiaiz8OePMcSg0+NAMay5KxXkg0YfPDhOGL3Z997BOGUZn7izqvZOdt4dNW94Y05u yUokq3dILtK+Tg5AQhiryeD/ajuuXcJOZmqINTDOGge0A8SVwA5yobytIhQFtyilYd+m al/eBt5jTvjcbfCGDE5hk8tSjMjmyd80qlTrsDH7cZGVS32xbRfyR8NPuB4Hox5lxljt fbyzkBaWzzIbNI6tWDHZRuw956xcLOvlAdy0MAropQCbMk7Fi/2B24B5zZcpHGa25l/s QfFg== X-Gm-Message-State: AOAM5314sVUY6np8G9LyMy5nJUyzhw8MZk5b7KqMmstzxN1cJtGp39K8 RfrjAbBqplHUAsBiAeV/NfVjT41CBImd1jM9qq8= X-Google-Smtp-Source: ABdhPJwnUo3SPzFruxDNjO6KkeadAjaEt24cEjURYPZwqg4T7rJCke1y7yAmutfYkR2neLa4A/Xu9PJdl587OpPA0fI= X-Received: by 2002:a05:6602:29ca:b0:649:558a:f003 with SMTP id z10-20020a05660229ca00b00649558af003mr4726790ioq.160.1651510793647; Mon, 02 May 2022 09:59:53 -0700 (PDT) MIME-Version: 1.0 References: <20220328104102.2292890-1-vfialko@marvell.com> In-Reply-To: <20220328104102.2292890-1-vfialko@marvell.com> From: Jerin Jacob Date: Mon, 2 May 2022 22:29:27 +0530 Message-ID: Subject: Re: [PATCH] common/cnxk: fix missing null check for inline device To: Volodymyr Fialko Cc: dpdk-dev , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jerin Jacob , dpdk stable Content-Type: text/plain; charset="UTF-8" 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 On Mon, Mar 28, 2022 at 4:11 PM Volodymyr Fialko wrote: > > Inline device could be null in cases when it was not bound or missing. > Added check to prevent null pointer access. > > Fixes: fe5846bcc07 ("net/cnxk: add devargs for min-max SPI") > > Cc: stable@dpdk.org > > Signed-off-by: Volodymyr Fialko Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/for-next-net. Thanks > --- > drivers/common/cnxk/roc_nix_inl.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c > index 877a9f1aa8..d0a38d2d4d 100644 > --- a/drivers/common/cnxk/roc_nix_inl.c > +++ b/drivers/common/cnxk/roc_nix_inl.c > @@ -158,6 +158,8 @@ roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix, bool inb_inl_dev, > > inl_dev = idev->nix_inl_dev; > if (inb_inl_dev) { > + if (inl_dev == NULL) > + goto exit; > min = inl_dev->ipsec_in_min_spi; > max = inl_dev->ipsec_in_max_spi; > mask = inl_dev->inb_spi_mask; > -- > 2.25.1 >