Skip to contentSkip to conversation

arm: fix incorrect bounds check

PATCH New Mika Penttilä 1 participant 1 message Jan 15, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: fix incorrect bounds check

Recent changes (4.4.0+) in module loader triggered oops on ARM. While investigating it found incorrect bounds check. This was not the cause of the oops but incorrect anyway.

--Mika

Signed-off-by [email protected]

---

arch/arm/mm/pageattr.c +0 -0
index cf30daf..be7fe4b 100644
@@ -52,7 +52,7 @@ static int change_memory_common(unsigned long addr,

int numpages,

        if (start < MODULES_VADDR || start >= MODULES_END)
                return -EINVAL;
-       if (end < MODULES_VADDR || start >= MODULES_END)
+       if (end < MODULES_VADDR || end >= MODULES_END)
                return -EINVAL;

        data.set_mask = set_mask;