aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-11-15 00:36:34 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-12-03 00:23:33 -0500
commit5084205faf45384fff25c4cf77dd5c96279283ad (patch)
tree9a5a3cb74bf64a6ec4c1b77d7805b256978943ca
parent44bb93633f57a55979f3c2589b10fd6a2bfc7c08 (diff)
[NET]: Annotate callers of csum_partial_copy_...() and csum_and_copy...() in net/*
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/skbuff.h3
-rw-r--r--include/net/sock.h2
-rw-r--r--net/core/datagram.c6
-rw-r--r--net/core/skbuff.c2
-rw-r--r--net/ipv4/ip_output.c2
5 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index e3ae544b3956..64fa7f4c702d 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1199,8 +1199,7 @@ static inline int skb_add_data(struct sk_buff *skb,
1199 1199
1200 if (skb->ip_summed == CHECKSUM_NONE) { 1200 if (skb->ip_summed == CHECKSUM_NONE) {
1201 int err = 0; 1201 int err = 0;
1202 unsigned int csum = csum_and_copy_from_user(from, 1202 __wsum csum = csum_and_copy_from_user(from, skb_put(skb, copy),
1203 skb_put(skb, copy),
1204 copy, 0, &err); 1203 copy, 0, &err);
1205 if (!err) { 1204 if (!err) {
1206 skb->csum = csum_block_add(skb->csum, csum, off); 1205 skb->csum = csum_block_add(skb->csum, csum, off);
diff --git a/include/net/sock.h b/include/net/sock.h
index 35ffbdd35d3e..dc4b92b8abea 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -1088,7 +1088,7 @@ static inline int skb_copy_to_page(struct sock *sk, char __user *from,
1088{ 1088{
1089 if (skb->ip_summed == CHECKSUM_NONE) { 1089 if (skb->ip_summed == CHECKSUM_NONE) {
1090 int err = 0; 1090 int err = 0;
1091 unsigned int csum = csum_and_copy_from_user(from, 1091 __wsum csum = csum_and_copy_from_user(from,
1092 page_address(page) + off, 1092 page_address(page) + off,
1093 copy, 0, &err); 1093 copy, 0, &err);
1094 if (err) 1094 if (err)
diff --git a/net/core/datagram.c b/net/core/datagram.c
index e5a05a046fef..0d9c9bac4006 100644
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -321,7 +321,7 @@ fault:
321 321
322static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset, 322static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset,
323 u8 __user *to, int len, 323 u8 __user *to, int len,
324 unsigned int *csump) 324 __wsum *csump)
325{ 325{
326 int start = skb_headlen(skb); 326 int start = skb_headlen(skb);
327 int pos = 0; 327 int pos = 0;
@@ -350,7 +350,7 @@ static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset,
350 350
351 end = start + skb_shinfo(skb)->frags[i].size; 351 end = start + skb_shinfo(skb)->frags[i].size;
352 if ((copy = end - offset) > 0) { 352 if ((copy = end - offset) > 0) {
353 unsigned int csum2; 353 __wsum csum2;
354 int err = 0; 354 int err = 0;
355 u8 *vaddr; 355 u8 *vaddr;
356 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 356 skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
@@ -386,7 +386,7 @@ static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset,
386 386
387 end = start + list->len; 387 end = start + list->len;
388 if ((copy = end - offset) > 0) { 388 if ((copy = end - offset) > 0) {
389 unsigned int csum2 = 0; 389 __wsum csum2 = 0;
390 if (copy > len) 390 if (copy > len)
391 copy = len; 391 copy = len;
392 if (skb_copy_and_csum_datagram(list, 392 if (skb_copy_and_csum_datagram(list,
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index c0e3427057fc..da6683f4b31d 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1342,7 +1342,7 @@ unsigned int skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
1342 1342
1343 end = start + skb_shinfo(skb)->frags[i].size; 1343 end = start + skb_shinfo(skb)->frags[i].size;
1344 if ((copy = end - offset) > 0) { 1344 if ((copy = end - offset) > 0) {
1345 unsigned int csum2; 1345 __wsum csum2;
1346 u8 *vaddr; 1346 u8 *vaddr;
1347 skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; 1347 skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
1348 1348
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index f9194f7e39d3..1da3d32f8289 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1314,7 +1314,7 @@ void ip_flush_pending_frames(struct sock *sk)
1314static int ip_reply_glue_bits(void *dptr, char *to, int offset, 1314static int ip_reply_glue_bits(void *dptr, char *to, int offset,
1315 int len, int odd, struct sk_buff *skb) 1315 int len, int odd, struct sk_buff *skb)
1316{ 1316{
1317 unsigned int csum; 1317 __wsum csum;
1318 1318
1319 csum = csum_partial_copy_nocheck(dptr+offset, to, len, 0); 1319 csum = csum_partial_copy_nocheck(dptr+offset, to, len, 0);
1320 skb->csum = csum_block_add(skb->csum, csum, odd); 1320 skb->csum = csum_block_add(skb->csum, csum, odd);