aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/include/asm/checksum.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-03-31 17:35:30 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-03-31 17:35:30 -0400
commit1f8c538ed6a3323b06c2459e9ca36e0ae8bb0ebc (patch)
tree852cfd52103939d2ddcba38f4f1c34b9da258d97 /arch/s390/include/asm/checksum.h
parent190f918660a69d1c56fd05dc8c6cbb8336a8a0af (diff)
parent233faec97a1dfef1f4bc271f9e5d33f2ba4845ca (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux
Pull s390 updates from Martin Schwidefsky: "There are two memory management related changes, the CMMA support for KVM to avoid swap-in of freed pages and the split page table lock for the PMD level. These two come with common code changes in mm/. A fix for the long standing theoretical TLB flush problem, this one comes with a common code change in kernel/sched/. Another set of changes is Heikos uaccess work, included is the initial set of patches with more to come. And fixes and cleanups as usual" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: (36 commits) s390/con3270: optionally disable auto update s390/mm: remove unecessary parameter from pgste_ipte_notify s390/mm: remove unnecessary parameter from gmap_do_ipte_notify s390/mm: fixing comment so that parameter name match s390/smp: limit number of cpus in possible cpu mask hypfs: Add clarification for "weight_min" attribute s390: update defconfigs s390/ptrace: add support for PTRACE_SINGLEBLOCK s390/perf: make print_debug_cf() static s390/topology: Remove call to update_cpu_masks() s390/compat: remove compat exec domain s390: select CONFIG_TTY for use of tty in unconditional keyboard driver s390/appldata_os: fix cpu array size calculation s390/checksum: remove memset() within csum_partial_copy_from_user() s390/uaccess: remove copy_from_user_real() s390/sclp_early: Return correct HSA block count also for zero s390: add some drivers/subsystems to the MAINTAINERS file s390: improve debug feature usage s390/airq: add support for irq ranges s390/mm: enable split page table lock for PMD level ...
Diffstat (limited to 'arch/s390/include/asm/checksum.h')
-rw-r--r--arch/s390/include/asm/checksum.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/s390/include/asm/checksum.h b/arch/s390/include/asm/checksum.h
index 4f57a4f3909a..740364856355 100644
--- a/arch/s390/include/asm/checksum.h
+++ b/arch/s390/include/asm/checksum.h
@@ -44,22 +44,15 @@ csum_partial(const void *buff, int len, __wsum sum)
44 * here even more important to align src and dst on a 32-bit (or even 44 * here even more important to align src and dst on a 32-bit (or even
45 * better 64-bit) boundary 45 * better 64-bit) boundary
46 * 46 *
47 * Copy from userspace and compute checksum. If we catch an exception 47 * Copy from userspace and compute checksum.
48 * then zero the rest of the buffer.
49 */ 48 */
50static inline __wsum 49static inline __wsum
51csum_partial_copy_from_user(const void __user *src, void *dst, 50csum_partial_copy_from_user(const void __user *src, void *dst,
52 int len, __wsum sum, 51 int len, __wsum sum,
53 int *err_ptr) 52 int *err_ptr)
54{ 53{
55 int missing; 54 if (unlikely(copy_from_user(dst, src, len)))
56
57 missing = copy_from_user(dst, src, len);
58 if (missing) {
59 memset(dst + len - missing, 0, missing);
60 *err_ptr = -EFAULT; 55 *err_ptr = -EFAULT;
61 }
62
63 return csum_partial(dst, len, sum); 56 return csum_partial(dst, len, sum);
64} 57}
65 58