diff options
author | Alexei Starovoitov <ast@plumgrid.com> | 2015-08-28 15:56:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-28 16:27:27 -0700 |
commit | 1a6877b9c0c2ad901d4335d909432d3bb6d3a330 (patch) | |
tree | 25b3a1577a82199d1100834c1bbf6cefad34a5a7 /include/linux/uaccess.h | |
parent | c9fd56b34efd06a031cbc918d288f09e38173ff9 (diff) |
lib: introduce strncpy_from_unsafe()
generalize FETCH_FUNC_NAME(memory, string) into
strncpy_from_unsafe() and fix sparse warnings that were
present in original implementation.
Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/uaccess.h')
-rw-r--r-- | include/linux/uaccess.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h index ae572c138607..d6f2c2c5b043 100644 --- a/include/linux/uaccess.h +++ b/include/linux/uaccess.h @@ -129,4 +129,6 @@ extern long __probe_kernel_read(void *dst, const void *src, size_t size); extern long notrace probe_kernel_write(void *dst, const void *src, size_t size); extern long notrace __probe_kernel_write(void *dst, const void *src, size_t size); +extern long strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count); + #endif /* __LINUX_UACCESS_H__ */ |