aboutsummaryrefslogtreecommitdiffstats
path: root/mm/usercopy.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/usercopy.c')
-rw-r--r--mm/usercopy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/usercopy.c b/mm/usercopy.c
index 8ebae91a6b55..a3cc3052f830 100644
--- a/mm/usercopy.c
+++ b/mm/usercopy.c
@@ -83,7 +83,7 @@ static bool overlaps(const void *ptr, unsigned long n, unsigned long low,
83 unsigned long check_high = check_low + n; 83 unsigned long check_high = check_low + n;
84 84
85 /* Does not overlap if entirely above or entirely below. */ 85 /* Does not overlap if entirely above or entirely below. */
86 if (check_low >= high || check_high < low) 86 if (check_low >= high || check_high <= low)
87 return false; 87 return false;
88 88
89 return true; 89 return true;
@@ -124,7 +124,7 @@ static inline const char *check_kernel_text_object(const void *ptr,
124static inline const char *check_bogus_address(const void *ptr, unsigned long n) 124static inline const char *check_bogus_address(const void *ptr, unsigned long n)
125{ 125{
126 /* Reject if object wraps past end of memory. */ 126 /* Reject if object wraps past end of memory. */
127 if (ptr + n < ptr) 127 if ((unsigned long)ptr + n < (unsigned long)ptr)
128 return "<wrapped address>"; 128 return "<wrapped address>";
129 129
130 /* Reject if NULL or ZERO-allocation. */ 130 /* Reject if NULL or ZERO-allocation. */