mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
c0ee37e85e
commit
25f12ae45f
20 changed files with 40 additions and 40 deletions
|
@ -419,8 +419,8 @@ static bool test_kernel_ptr(unsigned long addr, int size)
|
|||
/* should be at least readable kernel address */
|
||||
if (access_ok(ptr, 1) ||
|
||||
access_ok(ptr + size - 1, 1) ||
|
||||
probe_kernel_address(ptr, buf) ||
|
||||
probe_kernel_address(ptr + size - 1, buf)) {
|
||||
get_kernel_nofault(buf, ptr) ||
|
||||
get_kernel_nofault(buf, ptr + size - 1)) {
|
||||
pr_err("invalid kernel ptr: %#lx\n", addr);
|
||||
return true;
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ static bool __maybe_unused test_magic(unsigned long addr, int offset,
|
|||
if (!addr)
|
||||
return false;
|
||||
|
||||
if (probe_kernel_address(ptr, magic) || magic != expected) {
|
||||
if (get_kernel_nofault(magic, ptr) || magic != expected) {
|
||||
pr_err("invalid magic at %#lx + %#x = %#x, expected %#x\n",
|
||||
addr, offset, magic, expected);
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue