From: Wei Liu Subject: Re: [Xen-users] kernel 3.9.2 - xen 4.2.2/4.3rc1 => BUG unable to handle kernel paging request netif_poll+0x49c/0xe8 Date: Fri, 31 May 2013 17:05:35 +0100 Message-ID: <20130531160535.GA9573@zion.uk.xensource.com> References: <8511913.uMAmUdIO30@eistomin.edss.local> <5196407602000078000D7040@nat28.tlf.novell.com> <1467946.TvW6SdLxLt@eistomin.edss.local> <1763543.Xm2ls0EQVV@eistomin.edss.local> <519B609402000078000D7998@nat28.tlf.novell.com> <20130521152846.GP32007@zion.uk.xensource.com> <20130531154730.GO4394@zion.uk.xensource.com> <51A8E54002000078000DA235@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <51A8E54002000078000DA235@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: Eugene Istomin , Wei Liu , IanCampbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, May 31, 2013 at 05:00:32PM +0100, Jan Beulich wrote: > >>> On 31.05.13 at 17:47, Wei Liu wrote: > > --- a/drivers/xen/netfront/netfront.c > > +++ b/drivers/xen/netfront/netfront.c > > @@ -1319,6 +1319,7 @@ static RING_IDX xennet_fill_frags(struct netfront_info *np, > > kfree_skb(nskb); > > > > nr_frags++; > > + BUG_ON(nr_frags >= MAX_SKB_FRAGS); > > Isn't this going to see false positives? I would have thought such a > check would need to go at the top of the loop body. > > Jan > Ha, yes. Please use this one. Wei. ----- diff --git a/drivers/xen/netfront/netfront.c b/drivers/xen/netfront/netfront.c index 6e5d233..9583011 100644 --- a/drivers/xen/netfront/netfront.c +++ b/drivers/xen/netfront/netfront.c @@ -1306,6 +1306,7 @@ static RING_IDX xennet_fill_frags(struct netfront_info *np, struct sk_buff *nskb; while ((nskb = __skb_dequeue(list))) { + BUG_ON(nr_frags >= MAX_SKB_FRAGS); struct netif_rx_response *rx = RING_GET_RESPONSE(&np->rx, ++cons);