summaryrefslogtreecommitdiff
path: root/lib/strnlen_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strnlen_user.c')
-rw-r--r--lib/strnlen_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index 1616710b8a82..bffa0ebf9f8b 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -96,7 +96,7 @@ long strnlen_user(const char __user *str, long count)
if (unlikely(count <= 0))
return 0;
- max_addr = user_addr_max();
+ max_addr = TASK_SIZE_MAX;
src_addr = (unsigned long)untagged_addr(str);
if (likely(src_addr < max_addr)) {
unsigned long max = max_addr - src_addr;