Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

at v5.2 33 lines 729 B view raw
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 */ 4#include <linux/module.h> 5#include <net/checksum.h> 6 7#include <asm/byteorder.h> 8 9/* 10 * copy from fs while checksumming, otherwise like csum_partial 11 */ 12__wsum 13csum_partial_copy_from_user(const void __user *src, void *dst, int len, 14 __wsum sum, int *csum_err) 15{ 16 int missing; 17 18 missing = __copy_from_user(dst, src, len); 19 if (missing) { 20 memset(dst + len - missing, 0, missing); 21 *csum_err = -EFAULT; 22 } else 23 *csum_err = 0; 24 25 return csum_partial(dst, len, sum); 26} 27EXPORT_SYMBOL(csum_partial_copy_from_user); 28 29/* These are from csum_64plus.S */ 30EXPORT_SYMBOL(csum_partial); 31EXPORT_SYMBOL(csum_partial_copy); 32EXPORT_SYMBOL(ip_compute_csum); 33EXPORT_SYMBOL(ip_fast_csum);