aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_output.c8
-rw-r--r--net/ipv6/ip6_output.c10
2 files changed, 7 insertions, 11 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index bc6471d4abcd..4a929adf2ab7 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -662,12 +662,10 @@ slow_path:
662 if (len < left) { 662 if (len < left) {
663 len &= ~7; 663 len &= ~7;
664 } 664 }
665 /*
666 * Allocate buffer.
667 */
668 665
669 if ((skb2 = alloc_skb(len+hlen+ll_rs, GFP_ATOMIC)) == NULL) { 666 /* Allocate buffer */
670 NETDEBUG(KERN_INFO "IP: frag: no memory for new fragment!\n"); 667 skb2 = alloc_skb(len + hlen + ll_rs, GFP_ATOMIC);
668 if (!skb2) {
671 err = -ENOMEM; 669 err = -ENOMEM;
672 goto fail; 670 goto fail;
673 } 671 }
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 8e950c250ada..916d2a166a9b 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -747,13 +747,11 @@ slow_path:
747 if (len < left) { 747 if (len < left) {
748 len &= ~7; 748 len &= ~7;
749 } 749 }
750 /*
751 * Allocate buffer.
752 */
753 750
754 if ((frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) + 751 /* Allocate buffer */
755 hroom + troom, GFP_ATOMIC)) == NULL) { 752 frag = alloc_skb(len + hlen + sizeof(struct frag_hdr) +
756 NETDEBUG(KERN_INFO "IPv6: frag: no memory for new fragment!\n"); 753 hroom + troom, GFP_ATOMIC);
754 if (!frag) {
757 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), 755 IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)),
758 IPSTATS_MIB_FRAGFAILS); 756 IPSTATS_MIB_FRAGFAILS);
759 err = -ENOMEM; 757 err = -ENOMEM;