summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/Makefile
diff options
context:
space:
mode:
authorRalf Baechle2007-02-19 17:59:24 +0100
committerRalf Baechle2007-02-20 02:26:42 +0100
commite03b526932a9ae1ff20b47459c040f3c6407f625 (patch)
tree6c1753fc5a0497621b05c7dae9d3d686503bc5d7 /arch/mips/lib/Makefile
parent[MIPS] Fix struct sigcontext for N32 userland (diff)
downloadkernel-qcow2-linux-e03b526932a9ae1ff20b47459c040f3c6407f625.tar.gz
kernel-qcow2-linux-e03b526932a9ae1ff20b47459c040f3c6407f625.tar.xz
kernel-qcow2-linux-e03b526932a9ae1ff20b47459c040f3c6407f625.zip
[MIPS] Fixup copy_from_user_inatomic
From the 01408c4939479ec46c15aa7ef6e2406be50eeeca log message: The problem is that when we write to a file, the copy from userspace to pagecache is first done with preemption disabled, so if the source address is not immediately available the copy fails *and* *zeros* *the* *destination*. This is a problem because a concurrent read (which admittedly is an odd thing to do) might see zeros rather that was there before the write, or what was there after, or some mixture of the two (any of these being a reasonable thing to see). If the copy did fail, it will immediately be retried with preemption re-enabled so any transient problem with accessing the source won't cause an error. The first copying does not need to zero any uncopied bytes, and doing so causes the problem. It uses copy_from_user_atomic rather than copy_from_user so the simple expedient is to change copy_from_user_atomic to *not* zero out bytes on failure. < --- end cite --- > This patch finally implements at least a not so pretty solution by duplicating the relevant part of __copy_user. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/lib/Makefile')
-rw-r--r--arch/mips/lib/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/lib/Makefile b/arch/mips/lib/Makefile
index 9e5d985936b3..2453ea244cb8 100644
--- a/arch/mips/lib/Makefile
+++ b/arch/mips/lib/Makefile
@@ -2,7 +2,7 @@
# Makefile for MIPS-specific library files..
#
-lib-y += csum_partial.o memcpy.o memset.o promlib.o \
+lib-y += csum_partial.o memcpy.o memcpy-inatomic.o memset.o promlib.o \
strlen_user.o strncpy_user.o strnlen_user.o uncached.o
obj-y += iomap.o