From: Keir Fraser Subject: Re: Possible overflow in netbk_get_requests() Date: Mon, 04 Aug 2008 11:35:30 +0100 Message-ID: References: <20080804024832.GA10400@verge.net.au> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080804024832.GA10400@verge.net.au> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Simon Horman , xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org netbk_count_frags() should check we have no more than MAX_SKB_FRAGS for this packet, and the loop header in net_tx_action() checks we do no more than MAX_PENDING_REQS fragments of work (this is subtle: NR_PENDING_REQS cannot decrease while we execute the loop!). It's all a bit too subtle for its own good. ;-) -- Keir On 4/8/08 03:48, "Simon Horman" wrote: > Hi, > > I'm wondering if the call to netbk_get_requests() in > net_tx_action() might cause an overflow in the case where > there are more fragments than available slots in tx_map_ops (aka mop).