Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EE2D8C433DF for ; Mon, 12 Oct 2020 17:09:04 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 81DC720838 for ; Mon, 12 Oct 2020 17:09:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 81DC720838 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B06C61D95D; Mon, 12 Oct 2020 19:09:02 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 910381D948; Mon, 12 Oct 2020 19:08:59 +0200 (CEST) IronPort-SDR: zPqUW3wmiW/mN2EEp8ljQgQct43SJuo5WRFUvP+Uz67GFRpfjg4dH70slgnF+RCbHHjM6+A91m jJWhxFNtDoEQ== X-IronPort-AV: E=McAfee;i="6000,8403,9772"; a="183237381" X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="183237381" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 10:08:57 -0700 IronPort-SDR: 5Z9MsidCJtvCJ8d5obNYDBXmORpvdo7IP1pXbROn83hDNegVVW8gif5b9RXMrngMMFAs65xUy4 pVk0aUNayh9w== X-IronPort-AV: E=Sophos;i="5.77,367,1596524400"; d="scan'208";a="520755962" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.213.244.119]) ([10.213.244.119]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Oct 2020 10:08:56 -0700 To: Cian Ferriter Cc: dev@dpdk.org, stable@dpdk.org, rchibois@gmail.com References: <20201009161649.1365261-1-ferruh.yigit@intel.com> From: Ferruh Yigit Message-ID: Date: Mon, 12 Oct 2020 18:08:53 +0100 MIME-Version: 1.0 In-Reply-To: <20201009161649.1365261-1-ferruh.yigit@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] net/pcap: fix possible crash on exit for infinite Rx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" On 10/9/2020 5:16 PM, Ferruh Yigit wrote: > If the infinite Rx argument ('infinite_rx') is provided a ring is > allocated and filled in the '.rx_queue_setup' dev_ops. > Later this ring freed in the '.dev_close' dev_ops. > > If the 'infinite_rx' provided and '.dev_close' called before > '.rx_queue_setup', the ring will be NULL and trying to empty/free it > will cause a crash. > > This is fixed by adding ring NULL check before trying to empty/free it. > > Bugzilla ID: 548 > Fixes: a3f5252e5cbd ("net/pcap: enable infinitely Rx a pcap file") > Cc: stable@dpdk.org > > Signed-off-by: Ferruh Yigit Applied to dpdk-next-net/main, thanks.