diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-05 02:04:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-05 02:04:07 -0400 |
commit | fbc1ec2efe665c07c8c71f9f19edb018f7984107 (patch) | |
tree | e7df9dac12c640a83ce8859300e061f1f8913ecd /mm/usercopy.c | |
parent | 02baff325462cc7e81241b21959c5e62e7ca575e (diff) | |
parent | c6935931c1894ff857616ff8549b61236a19148f (diff) |
Merge 4.8-rc5 into char-misc-next
We want the fixes in here for merging and testing.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/usercopy.c')
-rw-r--r-- | mm/usercopy.c | 4 |
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, | |||
124 | static inline const char *check_bogus_address(const void *ptr, unsigned long n) | 124 | static 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. */ |