* this is a new version of the above that records errors it finds in *errp,
* but continues and zeros the rest of the buffer.
*/
-unsigned int csum_partial_copy_from_user(const char *src, char *dst, int len,
+unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, int len,
unsigned int sum, int *errp);
/*
* Copy and checksum to user
*/
#define HAVE_CSUM_COPY_USER
-static inline unsigned int csum_and_copy_to_user (const char *src,
- char __user *dst,
+static inline unsigned int csum_and_copy_to_user (const unsigned char *src,
+ unsigned char __user *dst,
int len, int sum,
int *err_ptr)
{
+ might_sleep();
sum = csum_partial(src, len, sum);
if (copy_to_user(dst, src, len)) {
* the same as csum_partial, but copies from user space (but on MIPS
* we have just one address space, so this is identical to the above)
*/
-unsigned int csum_partial_copy_nocheck(const char *src, char *dst, int len,
- unsigned int sum);
+unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char *dst,
+ int len, unsigned int sum);
/*
* Fold a partial checksum without adding pseudo headers