X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fcore%2Fiovec.c;h=755c37fdaee799c734962a1739dafdbb71882ff5;hb=e98ff7f6d8164c5636538998fb7d1e08b1fbbddd;hp=d57ace949ab8b054626bd879c8129df5b0a404bf;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=linux-2.6 diff --git a/net/core/iovec.c b/net/core/iovec.c index d57ace949a..755c37fdae 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -33,14 +32,14 @@ * Verify iovec. The caller must ensure that the iovec is big enough * to hold the message iovec. * - * Save time not doing verify_area. copy_*_user will make this work + * Save time not doing access_ok. copy_*_user will make this work * in any case. */ int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode) { int size, err, ct; - + if (m->msg_namelen) { if (mode == VERIFY_READ) { err = move_addr_to_kernel(m->msg_name, m->msg_namelen, @@ -79,7 +78,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode) * * Note: this modifies the original iovec. */ - + int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) { while (len > 0) { @@ -103,7 +102,7 @@ int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) * * Note: this modifies the original iovec. */ - + int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len) { while (len > 0) { @@ -158,9 +157,9 @@ int memcpy_fromiovecend(unsigned char *kdata, struct iovec *iov, int offset, * call to this function will be unaligned also. */ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, - int offset, unsigned int len, int *csump) + int offset, unsigned int len, __wsum *csump) { - int csum = *csump; + __wsum csum = *csump; int partial_cnt = 0, err = 0; /* Skip over the finished iovecs */ @@ -209,7 +208,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, if (partial_cnt) { copy -= partial_cnt; if (copy_from_user(kdata + copy, base + copy, - partial_cnt)) + partial_cnt)) goto out_fault; } } @@ -224,7 +223,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov, kdata += copy + partial_cnt; iov++; } - *csump = csum; + *csump = csum; out: return err;