Skip to content

Commit

Permalink
m68k: implement __clear_user()
Browse files Browse the repository at this point in the history
m68k: implement __clear_user(), which is needed by fs/signalfd.c

Since we always let the MMU do all checking, clear_user() and __clear_user()
are identical. The old clear_user() is renamed to __clear_user() for
consistency.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Geert Uytterhoeven authored and Linus Torvalds committed May 15, 2007
1 parent 0fcdf96 commit 3c46bdc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions arch/m68k/lib/uaccess.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ EXPORT_SYMBOL(strnlen_user);
* Zero Userspace
*/

unsigned long clear_user(void __user *to, unsigned long n)
unsigned long __clear_user(void __user *to, unsigned long n)
{
unsigned long res;

Expand Down Expand Up @@ -219,4 +219,4 @@ unsigned long clear_user(void __user *to, unsigned long n)

return res;
}
EXPORT_SYMBOL(clear_user);
EXPORT_SYMBOL(__clear_user);
4 changes: 3 additions & 1 deletion include/asm-m68k/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ __constant_copy_to_user(void __user *to, const void *from, unsigned long n)

long strncpy_from_user(char *dst, const char __user *src, long count);
long strnlen_user(const char __user *src, long n);
unsigned long clear_user(void __user *to, unsigned long n);
unsigned long __clear_user(void __user *to, unsigned long n);

#define clear_user __clear_user

#define strlen_user(str) strnlen_user(str, 32767)

Expand Down

0 comments on commit 3c46bdc

Please sign in to comment.