diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-22 14:13:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-22 14:13:00 -0400 |
commit | 13c926e04602db207366c7d213dd99d443ac4ad8 (patch) | |
tree | d5d1f5acf648c5c58644eb28b42cb462d5ef7da1 | |
parent | 53ce2dc2718c57346c543dab254fc900c6fe6c65 (diff) | |
parent | 22117ea4fef4ea1c7d97c4d68c02c96c268a511b (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IRDA] irda_nl_get_mode: always results in failure
[PPP]: Fix output buffer size in ppp_decompress_frame().
[IRDA]: Avoid a label defined but not used warning in irda_init()
[IPV6]: Fix kernel panic while send SCTP data with IP fragments
[SNAP]: Check packet length before reading
[DCCP]: Allocation in atomic context
-rw-r--r-- | drivers/net/ppp_generic.c | 2 | ||||
-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 |
6 files changed, 17 insertions, 10 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index ef3325b69233..9293c82ef2af 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1726,7 +1726,7 @@ ppp_decompress_frame(struct ppp *ppp, struct sk_buff *skb) | |||
1726 | } | 1726 | } |
1727 | /* the decompressor still expects the A/C bytes in the hdr */ | 1727 | /* the decompressor still expects the A/C bytes in the hdr */ |
1728 | len = ppp->rcomp->decompress(ppp->rc_state, skb->data - 2, | 1728 | len = ppp->rcomp->decompress(ppp->rc_state, skb->data - 2, |
1729 | skb->len + 2, ns->data, ppp->mru + PPP_HDRLEN); | 1729 | skb->len + 2, ns->data, obuff_size); |
1730 | if (len < 0) { | 1730 | if (len < 0) { |
1731 | /* Pass the compressed frame to pppd as an | 1731 | /* Pass the compressed frame to pppd as an |
1732 | error indication. */ | 1732 | error indication. */ |
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)) |