Resend: [PATCH] skb_copy_bits() can return err]
[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
---
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 2005-06-01 15:20:52.954245318 -0700 renamed from linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 2005-05-31 20:12:37.000000000 -0700 +3 -1
@@ -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);
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c +3 -1
@@ -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);
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
Quoted 14 lines · Nivedita Singhvi
[Resend with patch included inline and signed-off by; sorry]
skb_copy_bits()can return an err, so havenetif_be_start_xmit()crash informatively..thanks,
NiveditaSigned-off-by Nivedita Singhvi ([email protected])---
diff -urNxen-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.cniv-unstable-0601/linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 2005-06-01 15:20:52.954245318 -0700 line 161
Quoted 10 lines
linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 2005-06-01 15:20:52.954245318 -0700 renamed from linux-2.6.11-xen-sparse/drivers/xen/netback/netback.c 2005-05-31 20:12:37.000000000 -0700 +3
-1@@ -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.