From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id E292D2931 for ; Mon, 19 Sep 2016 17:06:14 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP; 19 Sep 2016 08:06:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,362,1470726000"; d="scan'208";a="10843025" Received: from bricha3-mobl3.ger.corp.intel.com ([10.237.220.73]) by fmsmga006.fm.intel.com with SMTP; 19 Sep 2016 08:06:12 -0700 Received: by (sSMTP sendmail emulation); Mon, 19 Sep 2016 16:06:11 +0025 Date: Mon, 19 Sep 2016 16:06:11 +0100 From: Bruce Richardson To: Sagi Grimberg Cc: dev@dpdk.org, Adrien Mazarguil Message-ID: <20160919150611.GE45548@bricha3-MOBL3> References: <1470148881-24115-1-git-send-email-sagi@grimberg.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1470148881-24115-1-git-send-email-sagi@grimberg.me> Organization: Intel Research and =?iso-8859-1?Q?De=ACvel?= =?iso-8859-1?Q?opment?= Ireland Ltd. User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: fix possible NULL deref in Rx path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2016 15:06:15 -0000 On Tue, Aug 02, 2016 at 05:41:21PM +0300, Sagi Grimberg wrote: > The user is allowed to call ->rx_pkt_burst() even without free > mbufs in the pool. In this scenario we'll fail allocating a rep mbuf > on the first iteration (where pkt is still NULL). This would cause us > to deref a NULL pkt (reset refcount and free). > > Fix this by checking the pkt before freeing it. > > Fixes: a1bdb71a32da ("net/mlx5: fix crash in Rx") > > Signed-off-by: Sagi Grimberg > Acked-by: Adrien Mazarguil > --- Applied to dpdk-next-net/rel_16_11 /Bruce