diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/802/psnap.c | 17 | ||||
-rw-r--r-- | net/dccp/ccids/ccid2.c | 2 | ||||
-rw-r--r-- | net/ipv6/ip6_output.c | 2 | ||||
-rw-r--r-- | net/irda/irmod.c | 2 | ||||
-rw-r--r-- | net/irda/irnetlink.c | 2 |
5 files changed, 16 insertions, 9 deletions
diff --git a/net/802/psnap.c b/net/802/psnap.c index 04ee43e7538f..31128cb92a23 100644 --- a/net/802/psnap.c +++ b/net/802/psnap.c | |||
@@ -55,6 +55,9 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
55 | .type = __constant_htons(ETH_P_SNAP), | 55 | .type = __constant_htons(ETH_P_SNAP), |
56 | }; | 56 | }; |
57 | 57 | ||
58 | if (unlikely(!pskb_may_pull(skb, 5))) | ||
59 | goto drop; | ||
60 | |||
58 | rcu_read_lock(); | 61 | rcu_read_lock(); |
59 | proto = find_snap_client(skb_transport_header(skb)); | 62 | proto = find_snap_client(skb_transport_header(skb)); |
60 | if (proto) { | 63 | if (proto) { |
@@ -62,14 +65,18 @@ static int snap_rcv(struct sk_buff *skb, struct net_device *dev, | |||
62 | skb->transport_header += 5; | 65 | skb->transport_header += 5; |
63 | skb_pull_rcsum(skb, 5); | 66 | skb_pull_rcsum(skb, 5); |
64 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); | 67 | rc = proto->rcvfunc(skb, dev, &snap_packet_type, orig_dev); |
65 | } else { | ||
66 | skb->sk = NULL; | ||
67 | kfree_skb(skb); | ||
68 | rc = 1; | ||
69 | } | 68 | } |
70 | |||
71 | rcu_read_unlock(); | 69 | rcu_read_unlock(); |
70 | |||
71 | if (unlikely(!proto)) | ||
72 | goto drop; | ||
73 | |||
74 | out: | ||
72 | return rc; | 75 | return rc; |
76 | |||
77 | drop: | ||
78 | kfree_skb(skb); | ||
79 | goto out; | ||
73 | } | 80 | } |
74 | 81 | ||
75 | /* | 82 | /* |
diff --git a/net/dccp/ccids/ccid2.c b/net/dccp/ccids/ccid2.c index 248d20f4c7c4..d29b88fe723c 100644 --- a/net/dccp/ccids/ccid2.c +++ b/net/dccp/ccids/ccid2.c | |||
@@ -298,7 +298,7 @@ static void ccid2_hc_tx_packet_sent(struct sock *sk, int more, unsigned int len) | |||
298 | int rc; | 298 | int rc; |
299 | 299 | ||
300 | ccid2_pr_debug("allocating more space in history\n"); | 300 | ccid2_pr_debug("allocating more space in history\n"); |
301 | rc = ccid2_hc_tx_alloc_seq(hctx, CCID2_SEQBUF_LEN, GFP_KERNEL); | 301 | rc = ccid2_hc_tx_alloc_seq(hctx, CCID2_SEQBUF_LEN, gfp_any()); |
302 | BUG_ON(rc); /* XXX what do we do? */ | 302 | BUG_ON(rc); /* XXX what do we do? */ |
303 | 303 | ||
304 | next = hctx->ccid2hctx_seqh->ccid2s_next; | 304 | next = hctx->ccid2hctx_seqh->ccid2s_next; |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index 50d86e94d9ed..5dead399fe64 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -794,7 +794,7 @@ slow_path: | |||
794 | /* | 794 | /* |
795 | * Copy a block of the IP datagram. | 795 | * Copy a block of the IP datagram. |
796 | */ | 796 | */ |
797 | if (skb_copy_bits(skb, ptr, skb_transport_header(skb), len)) | 797 | if (skb_copy_bits(skb, ptr, skb_transport_header(frag), len)) |
798 | BUG(); | 798 | BUG(); |
799 | left -= len; | 799 | left -= len; |
800 | 800 | ||
diff --git a/net/irda/irmod.c b/net/irda/irmod.c index 1900937b3328..8ba703da2797 100644 --- a/net/irda/irmod.c +++ b/net/irda/irmod.c | |||
@@ -128,8 +128,8 @@ static int __init irda_init(void) | |||
128 | out_err_3: | 128 | out_err_3: |
129 | #ifdef CONFIG_SYSCTL | 129 | #ifdef CONFIG_SYSCTL |
130 | irda_sysctl_unregister(); | 130 | irda_sysctl_unregister(); |
131 | #endif | ||
132 | out_err_2: | 131 | out_err_2: |
132 | #endif | ||
133 | #ifdef CONFIG_PROC_FS | 133 | #ifdef CONFIG_PROC_FS |
134 | irda_proc_unregister(); | 134 | irda_proc_unregister(); |
135 | #endif | 135 | #endif |
diff --git a/net/irda/irnetlink.c b/net/irda/irnetlink.c index 694ea4d92fa8..1e429c929739 100644 --- a/net/irda/irnetlink.c +++ b/net/irda/irnetlink.c | |||
@@ -106,7 +106,7 @@ static int irda_nl_get_mode(struct sk_buff *skb, struct genl_info *info) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | if(nla_put_string(msg, IRDA_NL_ATTR_IFNAME, | 108 | if(nla_put_string(msg, IRDA_NL_ATTR_IFNAME, |
109 | dev->name)); | 109 | dev->name)) |
110 | goto err_out; | 110 | goto err_out; |
111 | 111 | ||
112 | if(nla_put_u32(msg, IRDA_NL_ATTR_MODE, irlap->mode)) | 112 | if(nla_put_u32(msg, IRDA_NL_ATTR_MODE, irlap->mode)) |