Skip to content

Commit a0d8d55

Browse files
author
Al Viro
committed
whack-a-mole: kill strlen_user() (again)
Signed-off-by: Al Viro <[email protected]>
1 parent eecf77e commit a0d8d55

File tree

5 files changed

+1
-6
lines changed

5 files changed

+1
-6
lines changed

arch/csky/include/asm/uaccess.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,6 @@ long __strncpy_from_user(char *dst, const char *src, long count);
397397
*/
398398
long strnlen_user(const char *src, long n);
399399

400-
#define strlen_user(str) strnlen_user(str, 32767)
401-
402400
struct exception_table_entry {
403401
unsigned long insn;
404402
unsigned long nextinsn;

arch/csky/lib/usercopy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ long strncpy_from_user(char *dst, const char *src, long count)
116116
EXPORT_SYMBOL(strncpy_from_user);
117117

118118
/*
119-
* strlen_user: - Get the size of a string in user space.
119+
* strnlen_user: - Get the size of a string in user space.
120120
* @str: The string to measure.
121121
* @n: The maximum valid length
122122
*

arch/nds32/include/asm/uaccess.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,6 @@ do { \
260260

261261
extern unsigned long __arch_clear_user(void __user * addr, unsigned long n);
262262
extern long strncpy_from_user(char *dest, const char __user * src, long count);
263-
extern __must_check long strlen_user(const char __user * str);
264263
extern __must_check long strnlen_user(const char __user * str, long n);
265264
extern unsigned long __arch_copy_from_user(void *to, const void __user * from,
266265
unsigned long n);

arch/nios2/include/asm/uaccess.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n);
8383

8484
extern long strncpy_from_user(char *__to, const char __user *__from,
8585
long __len);
86-
extern __must_check long strlen_user(const char __user *str);
8786
extern __must_check long strnlen_user(const char __user *s, long n);
8887

8988
/* Optimized macros */

arch/riscv/include/asm/uaccess.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ raw_copy_to_user(void __user *to, const void *from, unsigned long n)
372372

373373
extern long strncpy_from_user(char *dest, const char __user *src, long count);
374374

375-
extern long __must_check strlen_user(const char __user *str);
376375
extern long __must_check strnlen_user(const char __user *str, long n);
377376

378377
extern

0 commit comments

Comments
 (0)