From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2 7/7] vhost: do sanity check for desc->next Date: Mon, 7 Mar 2016 14:57:04 +0800 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 Cc: "Michael S. Tsirkin" , "dev@dpdk.org" , Victor Kaplansky To: "Xie, Huawei" 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) Content-Disposition: inline In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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