[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20131218211219.899085789@linuxfoundation.org>
Date: Wed, 18 Dec 2013 13:10:52 -0800
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Christian Gmeiner <christian.gmeiner@...il.com>,
Will Deacon <will.deacon@....com>,
Jon Medhurst <tixy@...aro.org>,
Russell King <rmk+kernel@....linux.org.uk>
Subject: [PATCH 3.12 015/118] ARM: 7917/1: cacheflush: correctly limit range of memory region being flushed
3.12-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jon Medhurst <tixy@...aro.org>
commit b31459adeab018b297541e288ac88873011da82a upstream.
The __do_cache_op function operates with a 'chunk' size of one page
but fails to limit the size of the final chunk so as to not exceed
the specified memory region. Fix this.
Reported-by: Christian Gmeiner <christian.gmeiner@...il.com>
Tested-by: Christian Gmeiner <christian.gmeiner@...il.com>
Acked-by: Will Deacon <will.deacon@....com>
Signed-off-by: Jon Medhurst <tixy@...aro.org>
Signed-off-by: Russell King <rmk+kernel@....linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/arm/kernel/traps.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -503,9 +503,10 @@ static inline int
__do_cache_op(unsigned long start, unsigned long end)
{
int ret;
- unsigned long chunk = PAGE_SIZE;
do {
+ unsigned long chunk = min(PAGE_SIZE, end - start);
+
if (signal_pending(current)) {
struct thread_info *ti = current_thread_info();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists