linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Hillf Danton" <hillf.zj@alibaba-inc.com>
To: "'Laura Abbott'" <laura@labbott.name>
Cc: "'Russell King'" <rmk+kernel@arm.linux.org.uk>,
	"'linux-kernel'" <linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: [patch] ARM: fix module-bound check in setting page attributes
Date: Mon, 04 May 2015 10:52:31 +0800	[thread overview]
Message-ID: <019401d08615$5e093000$1a1b9000$@alibaba-inc.com> (raw)
In-Reply-To: <5543C529.4080203@labbott.name>

It was introduced in commit f2ca09f381a59
(ARM: 8311/1: Don't use is_module_addr in setting page attributes)

We have no need to check start twice, but see if end is also in range.

Signed-off-by: Hillf Danton <hillf.zj@alibaba-inc.com>
Acked-by: Laura Abbott <laura@labbott.name>
---

--- a/arch/arm/mm/pageattr.c	Mon May  4 10:33:49 2015
+++ b/arch/arm/mm/pageattr.c	Mon May  4 10:35:32 2015
@@ -52,7 +52,7 @@ static int change_memory_common(unsigned
 	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;
--



      reply	other threads:[~2015-05-04  2:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  4:20 [patch] ARM: fix module-bound check in setting page attributes Hillf Danton
2015-04-07  8:30 ` Hillf Danton
2015-04-14  6:20   ` Hillf Danton
2015-05-01 18:25 ` Laura Abbott
2015-05-04  2:52   ` Hillf Danton [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='019401d08615$5e093000$1a1b9000$@alibaba-inc.com' \
    --to=hillf.zj@alibaba-inc.com \
    --cc=laura@labbott.name \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).