aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/ipv4/icmp.c2
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv6/icmp.c2
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/sunrpc/socklib.c5
6 files changed, 8 insertions, 7 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index da6683f4b31d..6e8c15b39eb8 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1294,7 +1294,7 @@ unsigned int skb_checksum(const struct sk_buff *skb, int offset,
1294 1294
1295 end = start + list->len; 1295 end = start + list->len;
1296 if ((copy = end - offset) > 0) { 1296 if ((copy = end - offset) > 0) {
1297 unsigned int csum2; 1297 __wsum csum2;
1298 if (copy > len) 1298 if (copy > len)
1299 copy = len; 1299 copy = len;
1300 csum2 = skb_checksum(list, offset - start, 1300 csum2 = skb_checksum(list, offset - start,
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index cb9da0842b77..40cf0d0e1b83 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -332,7 +332,7 @@ static int icmp_glue_bits(void *from, char *to, int offset, int len, int odd,
332 struct sk_buff *skb) 332 struct sk_buff *skb)
333{ 333{
334 struct icmp_bxm *icmp_param = (struct icmp_bxm *)from; 334 struct icmp_bxm *icmp_param = (struct icmp_bxm *)from;
335 unsigned int csum; 335 __wsum csum;
336 336
337 csum = skb_copy_and_csum_bits(icmp_param->skb, 337 csum = skb_copy_and_csum_bits(icmp_param->skb,
338 icmp_param->offset + offset, 338 icmp_param->offset + offset,
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 2bf54adee8c2..476cb6084c75 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -877,7 +877,7 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
877 } 877 }
878 if (tunnel->parms.o_flags&GRE_CSUM) { 878 if (tunnel->parms.o_flags&GRE_CSUM) {
879 *ptr = 0; 879 *ptr = 0;
880 *(__be16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr)); 880 *(__sum16*)ptr = ip_compute_csum((void*)(iph+1), skb->len - sizeof(struct iphdr));
881 } 881 }
882 } 882 }
883 883
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 4ab8acf37b54..3dcc4b7f41b4 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -262,7 +262,7 @@ static int icmpv6_getfrag(void *from, char *to, int offset, int len, int odd, st
262{ 262{
263 struct icmpv6_msg *msg = (struct icmpv6_msg *) from; 263 struct icmpv6_msg *msg = (struct icmpv6_msg *) from;
264 struct sk_buff *org_skb = msg->skb; 264 struct sk_buff *org_skb = msg->skb;
265 __u32 csum = 0; 265 __wsum csum = 0;
266 266
267 csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset, 267 csum = skb_copy_and_csum_bits(org_skb, msg->offset + offset,
268 to, len, csum); 268 to, len, csum);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index cee5db27e8b4..9b21d67ca48c 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -530,7 +530,7 @@ static int rawv6_push_pending_frames(struct sock *sk, struct flowi *fl,
530 530
531 /* in case cksum was not initialized */ 531 /* in case cksum was not initialized */
532 if (unlikely(csum)) 532 if (unlikely(csum))
533 tmp_csum = csum_sub(tmp_csum, csum); 533 tmp_csum = csum_sub(tmp_csum, csum_unfold(csum));
534 534
535 csum = csum_ipv6_magic(&fl->fl6_src, 535 csum = csum_ipv6_magic(&fl->fl6_src,
536 &fl->fl6_dst, 536 &fl->fl6_dst,
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 61a038fc30cf..2635c543ba06 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -45,7 +45,8 @@ static size_t skb_read_bits(skb_reader_t *desc, void *to, size_t len)
45 */ 45 */
46static size_t skb_read_and_csum_bits(skb_reader_t *desc, void *to, size_t len) 46static size_t skb_read_and_csum_bits(skb_reader_t *desc, void *to, size_t len)
47{ 47{
48 unsigned int csum2, pos; 48 unsigned int pos;
49 __wsum csum2;
49 50
50 if (len > desc->count) 51 if (len > desc->count)
51 len = desc->count; 52 len = desc->count;
@@ -160,7 +161,7 @@ int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb)
160 if (xdr_partial_copy_from_skb(xdr, 0, &desc, skb_read_and_csum_bits) < 0) 161 if (xdr_partial_copy_from_skb(xdr, 0, &desc, skb_read_and_csum_bits) < 0)
161 return -1; 162 return -1;
162 if (desc.offset != skb->len) { 163 if (desc.offset != skb->len) {
163 unsigned int csum2; 164 __wsum csum2;
164 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0); 165 csum2 = skb_checksum(skb, desc.offset, skb->len - desc.offset, 0);
165 desc.csum = csum_block_add(desc.csum, csum2, desc.offset); 166 desc.csum = csum_block_add(desc.csum, csum2, desc.offset);
166 } 167 }