diff options
author | Jon Medhurst <tixy@linaro.org> | 2013-12-09 13:45:46 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-20 07:48:52 -0800 |
commit | 2925f142d855585427a63da50744766a47659e0f (patch) | |
tree | ac16f39f39d60b655a74f0fab435de5d28b20aa6 /arch | |
parent | 56e975068d0f09c870ffb117c690919531e18294 (diff) |
ARM: 7917/1: cacheflush: correctly limit range of memory region being flushed
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@gmail.com>
Tested-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/kernel/traps.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 8fcda140358..65ed63f68ef 100644 --- 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(); |