summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-06-17 10:37:55 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-06-18 21:14:40 +0300
commit25f12ae45fc1931a1dce3cc59f9989a9d87834b0 (patch)
treec89ffb14ca4cbe9afbf312be9e983377c6de5f35 /include
parentc0ee37e85e0e47402b8bbe35b6cec8e06937ca58 (diff)
downloadlinux-25f12ae45fc1931a1dce3cc59f9989a9d87834b0.tar.xz
maccess: rename probe_kernel_address to get_kernel_nofault
Better describe what this helper does, and match the naming of copy_from_kernel_nofault. Also switch the argument order around, so that it acts and looks like get_user(). Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/uaccess.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index bef48da242cc..a508a3c08879 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -318,14 +318,14 @@ long strncpy_from_user_nofault(char *dst, const void __user *unsafe_addr,
long strnlen_user_nofault(const void __user *unsafe_addr, long count);
/**
- * probe_kernel_address(): safely attempt to read from a location
- * @addr: address to read from
- * @retval: read into this variable
+ * get_kernel_nofault(): safely attempt to read from a location
+ * @val: read into this variable
+ * @ptr: address to read from
*
* Returns 0 on success, or -EFAULT.
*/
-#define probe_kernel_address(addr, retval) \
- copy_from_kernel_nofault(&retval, addr, sizeof(retval))
+#define get_kernel_nofault(val, ptr) \
+ copy_from_kernel_nofault(&(val), (ptr), sizeof(val))
#ifndef user_access_begin
#define user_access_begin(ptr,len) access_ok(ptr, len)