Skip to content

Commit b4bbdce

Browse files
davem330gregkh
authored andcommitted
sparc64: Delete now unused user copy fixup functions.
[ Upstream commit 0fd0ff01d4c3c01e7fe69b762ee1a13236639acc ] Now that all of the user copy routines are converted to return accurate residual lengths when an exception occurs, we no longer need the broken fixup routines. Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cb85910 commit b4bbdce

3 files changed

Lines changed: 4 additions & 103 deletions

File tree

arch/sparc/include/asm/uaccess_64.h

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -204,58 +204,30 @@ int __get_user_bad(void);
204204
unsigned long __must_check ___copy_from_user(void *to,
205205
const void __user *from,
206206
unsigned long size);
207-
unsigned long copy_from_user_fixup(void *to, const void __user *from,
208-
unsigned long size);
209207
static inline unsigned long __must_check
210208
copy_from_user(void *to, const void __user *from, unsigned long size)
211209
{
212-
unsigned long ret = ___copy_from_user(to, from, size);
213-
214-
if (unlikely(ret)) {
215-
if ((long)ret < 0)
216-
ret = copy_from_user_fixup(to, from, size);
217-
return ret;
218-
}
219-
220-
return ret;
210+
return ___copy_from_user(to, from, size);
221211
}
222212
#define __copy_from_user copy_from_user
223213

224214
unsigned long __must_check ___copy_to_user(void __user *to,
225215
const void *from,
226216
unsigned long size);
227-
unsigned long copy_to_user_fixup(void __user *to, const void *from,
228-
unsigned long size);
229217
static inline unsigned long __must_check
230218
copy_to_user(void __user *to, const void *from, unsigned long size)
231219
{
232-
unsigned long ret = ___copy_to_user(to, from, size);
233-
234-
if (unlikely(ret)) {
235-
if ((long)ret < 0)
236-
ret = copy_to_user_fixup(to, from, size);
237-
return ret;
238-
}
239-
return ret;
220+
return ___copy_to_user(to, from, size);
240221
}
241222
#define __copy_to_user copy_to_user
242223

243224
unsigned long __must_check ___copy_in_user(void __user *to,
244225
const void __user *from,
245226
unsigned long size);
246-
unsigned long copy_in_user_fixup(void __user *to, void __user *from,
247-
unsigned long size);
248227
static inline unsigned long __must_check
249228
copy_in_user(void __user *to, void __user *from, unsigned long size)
250229
{
251-
unsigned long ret = ___copy_in_user(to, from, size);
252-
253-
if (unlikely(ret)) {
254-
if ((long)ret < 0)
255-
ret = copy_in_user_fixup(to, from, size);
256-
return ret;
257-
}
258-
return ret;
230+
return ___copy_in_user(to, from, size);
259231
}
260232
#define __copy_in_user copy_in_user
261233

arch/sparc/lib/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ lib-$(CONFIG_SPARC64) += NG4patch.o NG4copy_page.o NG4clear_page.o NG4memset.o
3838
lib-$(CONFIG_SPARC64) += GENmemcpy.o GENcopy_from_user.o GENcopy_to_user.o
3939
lib-$(CONFIG_SPARC64) += GENpatch.o GENpage.o GENbzero.o
4040

41-
lib-$(CONFIG_SPARC64) += copy_in_user.o user_fixup.o memmove.o
41+
lib-$(CONFIG_SPARC64) += copy_in_user.o memmove.o
4242
lib-$(CONFIG_SPARC64) += mcount.o ipcsum.o xor.o hweight.o ffs.o
4343

4444
obj-$(CONFIG_SPARC64) += iomap.o

arch/sparc/lib/user_fixup.c

Lines changed: 0 additions & 71 deletions
This file was deleted.

0 commit comments

Comments
 (0)