Skip to contentSkip to conversation

ARM: mm: fix address check in change_memory_common()

PATCH New Dmitry Vasilyanov 1 participant 1 message Mar 7, 2016 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: mm: fix address check in change_memory_common()

The (start >= MODULES_END) is checked twice. The second check has no sense.
Clearly, the intention was: (end >= MODULE_CHECK). Seems to be a typo, so this patch fixes it.

---
 arch/arm/mm/pageattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mm/pageattr.c +1 -1
index d19b1ad..9edf6b0 100644
@@ -55,7 +55,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;
Signature · 1 line
2.1.4