path: root/mm/maccess.c
diff options
authorChristoph Hellwig <>2020-06-08 21:34:14 -0700
committerLinus Torvalds <>2020-06-09 09:39:15 -0700
commitbd88bb5d4007949be7154deae7cef7173c751a95 (patch)
treea883a7b803c0b17688ffff1a71e6abe3a8bf49b8 /mm/maccess.c
parent3f0acb1eb3221b37daf065a84df6360e69c1b516 (diff)
maccess: rename strncpy_from_unsafe_user to strncpy_from_user_nofault
This matches the naming of strncpy_from_user, and also makes it more clear what the function is supposed to do. Signed-off-by: Christoph Hellwig <> Signed-off-by: Andrew Morton <> Cc: Alexei Starovoitov <> Cc: Daniel Borkmann <> Cc: "H. Peter Anvin" <> Cc: Ingo Molnar <> Cc: Masami Hiramatsu <> Cc: Thomas Gleixner <> Link: Signed-off-by: Linus Torvalds <>
Diffstat (limited to 'mm/maccess.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/maccess.c b/mm/maccess.c
index b3e15a8ec80f..41a494e3deac 100644
--- a/mm/maccess.c
+++ b/mm/maccess.c
@@ -217,7 +217,7 @@ long __strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count)
- * strncpy_from_unsafe_user: - Copy a NUL terminated string from unsafe user
+ * strncpy_from_user_nofault: - Copy a NUL terminated string from unsafe user
* address.
* @dst: Destination address, in kernel space. This buffer must be at
* least @count bytes long.
@@ -234,7 +234,7 @@ long __strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count)
* If @count is smaller than the length of the string, copies @count-1 bytes,
* sets the last byte of @dst buffer to NUL and returns @count.
-long strncpy_from_unsafe_user(char *dst, const void __user *unsafe_addr,
+long strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
long count)
mm_segment_t old_fs = get_fs();