summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-09-16 09:04:02 +0200
committerGeert Uytterhoeven <geert@linux-m68k.org>2021-09-24 13:35:06 +0200
commit25d2cae4a5578695f667e868ada38b0b73eb1080 (patch)
treeef3e103dae48b5c2ff7a047670123ce2ccca3ee0 /arch/m68k
parentc4f607c3124e4d2f33604f933b29496ce4111753 (diff)
downloadlinux-25d2cae4a5578695f667e868ada38b0b73eb1080.tar.bz2
m68k: Use BUILD_BUG for passing invalid sizes to get_user/put_user
Simplify the handling a bit by using the common helper instead of referencing undefined symbols. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Michael Schmitz <schmitzmic@gmail.com> Tested-by: Michael Schmitz <schmitzmic@gmail.com> Link: https://lore.kernel.org/r/20210916070405.52750-4-hch@lst.de Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/include/asm/uaccess.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/m68k/include/asm/uaccess.h b/arch/m68k/include/asm/uaccess.h
index 610bfe8d64d5..01334a9658c4 100644
--- a/arch/m68k/include/asm/uaccess.h
+++ b/arch/m68k/include/asm/uaccess.h
@@ -39,9 +39,6 @@ static inline int access_ok(const void __user *addr,
#define MOVES "move"
#endif
-extern int __put_user_bad(void);
-extern int __get_user_bad(void);
-
#define __put_user_asm(res, x, ptr, bwl, reg, err) \
asm volatile ("\n" \
"1: "MOVES"."#bwl" %2,%1\n" \
@@ -105,8 +102,7 @@ asm volatile ("\n" \
break; \
} \
default: \
- __pu_err = __put_user_bad(); \
- break; \
+ BUILD_BUG(); \
} \
__pu_err; \
})
@@ -179,8 +175,7 @@ asm volatile ("\n" \
break; \
} \
default: \
- __gu_err = __get_user_bad(); \
- break; \
+ BUILD_BUG(); \
} \
__gu_err; \
})