summaryrefslogtreecommitdiff
path: root/include/linux/uaccess.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-09-07 07:58:18 +0200
committerPalmer Dabbelt <palmerdabbelt@google.com>2020-10-04 10:25:35 -0700
commit24ce66c04a06a678f156cf575128246f3d214b4a (patch)
treec59625acbdad978d9a22e09fac6579e852b3b364 /include/linux/uaccess.h
parenteee4e23099c37b4e273c583ec8bb0415ad7eba32 (diff)
downloadlwn-24ce66c04a06a678f156cf575128246f3d214b4a.tar.gz
lwn-24ce66c04a06a678f156cf575128246f3d214b4a.zip
uaccess: provide a generic TASK_SIZE_MAX definition
Define TASK_SIZE_MAX as TASK_SIZE if not otherwise defined. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'include/linux/uaccess.h')
-rw-r--r--include/linux/uaccess.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/uaccess.h b/include/linux/uaccess.h
index 70073c802b48..d0e43761c708 100644
--- a/include/linux/uaccess.h
+++ b/include/linux/uaccess.h
@@ -31,6 +31,10 @@ typedef struct {
/* empty dummy */
} mm_segment_t;
+#ifndef TASK_SIZE_MAX
+#define TASK_SIZE_MAX TASK_SIZE
+#endif
+
#define uaccess_kernel() (false)
#define user_addr_max() (TASK_SIZE_MAX)