Blame SOURCES/bz1428120.patch

aea179
commit 237f3f9f43ecf4e8233836f16b0288ec6988414f
aea179
Author: David Smith <dsmith@redhat.com>
aea179
Date:   Thu Mar 2 11:14:47 2017 -0600
aea179
aea179
    Update lookup_bad_addr() for platforms where user_addr_max() doesn't exist.
aea179
    
aea179
    * runtime/linux/addr-map.c (lookup_bad_addr): Handle platforms (like
aea179
      s390x) where in_task() exists, but user_addr_max() doesn't.
aea179
aea179
diff --git a/runtime/linux/addr-map.c b/runtime/linux/addr-map.c
aea179
index b1b9bb0..c868604 100644
aea179
--- a/runtime/linux/addr-map.c
aea179
+++ b/runtime/linux/addr-map.c
aea179
@@ -53,7 +53,11 @@ lookup_bad_addr(const int type, const unsigned long addr, const size_t size)
aea179
 #else
aea179
   if (size == 0 || ULONG_MAX - addr < size - 1
aea179
       || (in_task() && !access_ok(type, (void *)addr, size))
aea179
-      || (!in_task() && ((user_addr_max() - size) < addr)))
aea179
+      || (!in_task()
aea179
+#if defined(user_addr_max)
aea179
+	  && ((user_addr_max() - size) < addr)
aea179
+#endif
aea179
+	      ))
aea179
     return 1;
aea179
 #endif
aea179