[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] skb_copy_bits() can return an err, so have netif_be_start_xmit()



ChangeSet 1.1632, 2005/06/02 09:10:58+01:00, kaf24@xxxxxxxxxxxxxxxxxxxx

        skb_copy_bits() can return an err, so have netif_be_start_xmit()
        crash informatively.
        Signed-off-by: Nivedita Singhvi <niv@xxxxxxxxxx>



 netback.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)


diff -Nru a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 
b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
--- a/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c     2005-06-02 
05:03:09 -04:00
+++ b/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c     2005-06-02 
05:03:09 -04:00
@@ -153,7 +153,8 @@
             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);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.