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] Resend: [PATCH] skb_copy_bits() can return err]

To: Nivedita Singhvi <nsnix@xxxxxxxxxxx>
Subject: Re: [Xen-devel] Resend: [PATCH] skb_copy_bits() can return err]
From: Adam Heath <doogie@xxxxxxxxxxxxx>
Date: Wed, 1 Jun 2005 18:17:27 -0500 (CDT)
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 01 Jun 2005 23:16:42 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <429E40A0.4050608@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>
References: <429E40A0.4050608@xxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 1 Jun 2005, Nivedita Singhvi wrote:

> [Resend with patch included inline and signed-off by; sorry]
>
> skb_copy_bits() can return an err, so have netif_be_start_xmit()
> crash informatively..
>
> thanks,
> Nivedita
>
> Signed-off-by: Nivedita Singhvi (niv@xxxxxxxxxx)
> ---
> diff -urN 
> xen-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 
> niv-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
> --- xen-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c   
>   2005-05-31 20:12:37.000000000 -0700
> +++ niv-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c   
>   2005-06-01 15:20:52.954245318 -0700
> @@ -153,7 +153,9 @@
>               goto drop;
>           skb_reserve(nskb, hlen);
>           __skb_put(nskb, skb->len);
> -        (void)skb_copy_bits(skb, -hlen, nskb->data - hlen, skb->len + hlen);
> +        if (skb_copy_bits(skb, -hlen, nskb->data - hlen, skb->len + hlen)) {
> +               BUG();
> +       }
>           nskb->dev = skb->dev;
>           nskb->proto_csum_valid = skb->proto_csum_valid;
>           dev_kfree_skb(skb);

Spacing problems.  Please check Documentation/CodingStyle.

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

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