From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 7FE28F72 for ; Mon, 7 Mar 2016 07:54:56 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 06 Mar 2016 22:54:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,550,1449561600"; d="scan'208";a="903553308" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.49]) by orsmga001.jf.intel.com with ESMTP; 06 Mar 2016 22:54:53 -0800 Date: Mon, 7 Mar 2016 14:57:04 +0800 From: Yuanhan Liu To: "Xie, Huawei" Message-ID: <20160307065704.GD14300@yliu-dev.sh.intel.com> References: <1449122773-25510-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-1-git-send-email-yuanhan.liu@linux.intel.com> <1455803352-5518-8-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "Michael S. Tsirkin" , "dev@dpdk.org" , Victor Kaplansky Subject: Re: [dpdk-dev] [PATCH v2 7/7] vhost: do sanity check for desc->next 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, 07 Mar 2016 06:54:56 -0000 On Mon, Mar 07, 2016 at 03:10:43AM +0000, Xie, Huawei wrote: > On 2/18/2016 9:48 PM, Yuanhan Liu wrote: > > + if (unlikely(desc->next >= vq->size)) > > + goto fail; > > desc chains could be forged into a loop then vhost runs the dead loop > until it exhaust all mbuf memory. Good point. Any elegant solution to avoid that? --yliu