ARM: cacheflush: correctly limit range of memory region being flushed
PATCH 1/1 ARM: 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]>
---
I'm reposting this patch for extra visibility, it was discussed in the thread title '[GIT PULL] Cacheflush updates for 3.12', see
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-December/216265.html
This patch is in Russell King's patch system as patch 7917...
http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7917/1
arch/arm/kernel/traps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/kernel/traps.c +2 -1
@@ -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();
Signature · 1 line
1.7.10.4