All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] skb_copy_bits() can return err
@ 2005-06-01 23:01 Nivedita Singhvi
  0 siblings, 0 replies; only message in thread
From: Nivedita Singhvi @ 2005-06-01 23:01 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 107 bytes --]

skb_copy_bits() can return an err, so have netif_be_start_xmit()
crash informatively..

thanks,
Nivedita



[-- Attachment #2: skb_cb.triv.patch --]
[-- Type: text/plain, Size: 779 bytes --]

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);

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-01 23:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-01 23:01 [PATCH] skb_copy_bits() can return err Nivedita Singhvi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.