Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
[cascardo/linux.git] / arch / x86 / vdso / vdso2c.h
index fd57829..0224987 100644 (file)
@@ -109,16 +109,18 @@ static void BITSFUNC(go)(void *raw_addr, size_t raw_len,
 
        /* Validate mapping addresses. */
        for (i = 0; i < sizeof(special_pages) / sizeof(special_pages[0]); i++) {
-               if (!syms[i])
+               INT_BITS symval = syms[special_pages[i]];
+
+               if (!symval)
                        continue;  /* The mapping isn't used; ignore it. */
 
-               if (syms[i] % 4096)
+               if (symval % 4096)
                        fail("%s must be a multiple of 4096\n",
                             required_syms[i].name);
-               if (syms[sym_vvar_start] > syms[i] + 4096)
-                       fail("%s underruns begin_vvar\n",
+               if (symval + 4096 < syms[sym_vvar_start])
+                       fail("%s underruns vvar_start\n",
                             required_syms[i].name);
-               if (syms[i] + 4096 > 0)
+               if (symval + 4096 > 0)
                        fail("%s is on the wrong side of the vdso text\n",
                             required_syms[i].name);
        }