WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] veth0 stuff in -unstable?

To: Nate Carlson <natecars@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] veth0 stuff in -unstable?
From: Gerd Knorr <kraxel@xxxxxxx>
Date: 14 Jul 2005 16:58:34 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 14 Jul 2005 14:58:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <87k6jtlb64.fsf@xxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: SUSE Labs, Berlin
References: <E1DqwYm-0001C9-00@xxxxxxxxxxxxxxxxx> <42CEC5A9.1060707@xxxxxxxxxx> <Pine.LNX.4.61.0507131136380.29965@xxxxxxxxxxxxxxxxxxxxxxxxx> <87k6jtlb64.fsf@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3
Gerd Knorr <kraxel@xxxxxxx> writes:

>                         for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
>                                 put_page(skb_shinfo(skb)->frags[i].page);
> 
> ebx is the loop count and is zero, so it's the first time we enter the
> loop.  skb_shinfo(skb)->frags[0].page is loaded into edx.  It is
> 0xffffffff (-1?).  Trying to dereference edx faults because it points
> into xen's memory area ...
> 
> So the question is why the heck the struct page pointer is -1 at this
> point?

Hmm, added a quick check to the most obvious place, that doesn't
trigger though, so it must happen somewhere else ...

Ideas anyone?

  Gerd

Index: linux-2.6.12-work/drivers/xen/netback/netback.c
===================================================================
--- linux-2.6.12-work.orig/drivers/xen/netback/netback.c        2005-07-14 
16:41:22.000000000 +0200
+++ linux-2.6.12-work/drivers/xen/netback/netback.c     2005-07-14 
16:43:18.000000000 +0200
@@ -626,6 +626,7 @@ static void net_tx_action(unsigned long 
             /* Append the packet payload as a fragment. */
             skb_shinfo(skb)->frags[0].page        = 
                 virt_to_page(MMAP_VADDR(pending_idx));
+            BUG_ON((void*)-1 == skb_shinfo(skb)->frags[0].page);
             skb_shinfo(skb)->frags[0].size        = txreq.size - data_len;
             skb_shinfo(skb)->frags[0].page_offset = 
                 (txreq.addr + data_len) & ~PAGE_MASK;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel