mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm: fix incorrect bounds check
@ 2016-01-15  5:40 Mika Penttilä
  0 siblings, 0 replies; only message in thread
From: Mika Penttilä @ 2016-01-15  5:40 UTC (permalink / raw)
  To: LKML; +Cc: linux

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: mika.penttila@nextfour.com
---

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

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

only message in thread, other threads:[~2016-01-15  6:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-15  5:40 [PATCH] arm: fix incorrect bounds check Mika Penttilä

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