diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 11 | ||||
-rw-r--r-- | net/core/skbuff.c | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index b8f74cfb1bfd..fe10551d3671 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -942,14 +942,15 @@ rollback: | |||
942 | ret = notifier_to_errno(ret); | 942 | ret = notifier_to_errno(ret); |
943 | 943 | ||
944 | if (ret) { | 944 | if (ret) { |
945 | if (err) { | 945 | /* err >= 0 after dev_alloc_name() or stores the first errno */ |
946 | printk(KERN_ERR | 946 | if (err >= 0) { |
947 | "%s: name change rollback failed: %d.\n", | ||
948 | dev->name, ret); | ||
949 | } else { | ||
950 | err = ret; | 947 | err = ret; |
951 | memcpy(dev->name, oldname, IFNAMSIZ); | 948 | memcpy(dev->name, oldname, IFNAMSIZ); |
952 | goto rollback; | 949 | goto rollback; |
950 | } else { | ||
951 | printk(KERN_ERR | ||
952 | "%s: name change rollback failed: %d.\n", | ||
953 | dev->name, ret); | ||
953 | } | 954 | } |
954 | } | 955 | } |
955 | 956 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 80a96166df39..ec85681a7dd8 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2701,7 +2701,8 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb) | |||
2701 | 2701 | ||
2702 | NAPI_GRO_CB(skb)->free = 1; | 2702 | NAPI_GRO_CB(skb)->free = 1; |
2703 | goto done; | 2703 | goto done; |
2704 | } | 2704 | } else if (skb_gro_len(p) != pinfo->gso_size) |
2705 | return -E2BIG; | ||
2705 | 2706 | ||
2706 | headroom = skb_headroom(p); | 2707 | headroom = skb_headroom(p); |
2707 | nskb = netdev_alloc_skb(p->dev, headroom + skb_gro_offset(p)); | 2708 | nskb = netdev_alloc_skb(p->dev, headroom + skb_gro_offset(p)); |