Blame SOURCES/bz1428120.patch

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