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] Error with NFS and XEN (High network load)

To: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>, Roberto Gonzalez Azevedo <rgonzalez@xxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Error with NFS and XEN (High network load)
From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 Aug 2006 02:04:23 +1000
Cc: Xen Development Mailing List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Aug 2006 09:05:34 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <44E25187.5030003@xxxxxxxxxxxxxxx>
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>
References: <44E25187.5030003@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Tue, Aug 15, 2006 at 10:58:15PM +0000, Roberto Gonzalez Azevedo wrote:
> 
> On domU machine:
> root@domU:# mount -t nfs real-machine-not-xen-or-any-virtual:/mnt /data
> [ok]
> 
> Crash:
> root@domU:# time dd if=/dev/zero of=/data/test.txt bs=16k count=16384
> [NOT OK]

Thanks for the report.  This is what I needed to reproduce the problem.
I forgot to initialise the first fragment to a proper value in the first
SG patch.

[NET] back: Initialise first fragment properly

The first fragment is used to store the pending_idx of the leading
txreq if it doesn't fit in the head area.  When it does fit into
the head we need to ensure that the first fragment contains a value
that is not equal to pending_idx as that's what we use to distinguish
between the two cases in a a number of places.

This patch sets the first fragment to ~0 which is not equal to any
valid pending_idx.  Without this initialisation, we may double-free
a pending_idx if the first fragment happened to contain a value
equal to it (this usually happened with pending_idx 0).

Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff -r ec03b24a2d83 linux-2.6-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Tue Aug 15 
19:53:55 2006 +0100
+++ b/linux-2.6-xen-sparse/drivers/xen/netback/netback.c        Thu Aug 17 
01:57:54 2006 +1000
@@ -1147,6 +1147,8 @@ static void net_tx_action(unsigned long 
                __skb_put(skb, data_len);
 
                skb_shinfo(skb)->nr_frags = ret;
+               skb_shinfo(skb)->frags[0].page = (void *)~0UL;
+
                if (data_len < txreq.size) {
                        skb_shinfo(skb)->nr_frags++;
                        skb_shinfo(skb)->frags[0].page =

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

<Prev in Thread] Current Thread [Next in Thread>