mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ARM: mm: fix address check in change_memory_common()
@ 2016-03-07 13:17 Dmitry Vasilyanov
  0 siblings, 0 replies; only message in thread
From: Dmitry Vasilyanov @ 2016-03-07 13:17 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel, linux-kernel, Dmitry Vasilyanov

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(-)

diff --git a/arch/arm/mm/pageattr.c b/arch/arm/mm/pageattr.c
index d19b1ad..9edf6b0 100644
--- a/arch/arm/mm/pageattr.c
+++ b/arch/arm/mm/pageattr.c
@@ -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;
-- 
2.1.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-03-07 13:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-07 13:17 [PATCH] ARM: mm: fix address check in change_memory_common() Dmitry Vasilyanov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome