diff options
author | Jon Medhurst <[email protected]> | 2013-12-09 13:45:46 +0100 |
---|---|---|
committer | Russell King <[email protected]> | 2013-12-09 23:24:35 +0000 |
commit | b31459adeab018b297541e288ac88873011da82a (patch) | |
tree | eca8de340db8e002f3c53a1cf1fe8d3272951a2c | |
parent | 3abb6671a9c04479c4bd026798a05f857393b7e2 (diff) |
ARM: 7917/1: cacheflush: correctly limit range of memory region being flushed
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.
Cc: <[email protected]>
Reported-by: Christian Gmeiner <[email protected]>
Tested-by: Christian Gmeiner <[email protected]>
Acked-by: Will Deacon <[email protected]>
Signed-off-by: Jon Medhurst <[email protected]>
Signed-off-by: Russell King <[email protected]>
-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 dbf0923e8d76..7940241f0576 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c @@ -509,9 +509,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(); |