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


Groups > linux.kernel > #1309886

[PATCH] arm: fix incorrect bounds check

From Mika Penttilä <mika.penttila@nextfour.com>
Newsgroups linux.kernel
Subject [PATCH] arm: fix incorrect bounds check
Date 2016-01-15 07:20 +0100
Message-ID <qR5TP-23l-7@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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;

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


Thread

[PATCH] arm: fix incorrect bounds check Mika Penttilä <mika.penttila@nextfour.com> - 2016-01-15 07:20 +0100

csiph-web