Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1351598

[PATCH] ARM: mm: fix address check in change_memory_common()

From Dmitry Vasilyanov <vdmit11@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] ARM: mm: fix address check in change_memory_common()
Date 2016-03-07 14:20 +0100
Message-ID <ra3eP-3jo-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] ARM: mm: fix address check in change_memory_common() Dmitry Vasilyanov <vdmit11@gmail.com> - 2016-03-07 14:20 +0100

csiph-web