ARM: 8226/1: cacheflush: get rid of restarting block
authorVladimir Murzin <vladimir.murzin@arm.com>
Thu, 27 Nov 2014 10:39:04 +0000 (11:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2014 23:55:37 +0000 (15:55 -0800)
commit9f285205f1e4e5a1c840bcf0f27bc9b91e95912a
treeac2ff569c16245eac02d8e37bf5c8639e37c6aa2
parentc84eb54a06e525d9b290a2c80fdd42f06d2c0380
ARM: 8226/1: cacheflush: get rid of restarting block

commit 3f4aa45ceea5789a4aade536acc27f2e0d3da5e1 upstream.

We cannot restart cacheflush safely if a process provides user-defined
signal handler and signal is pending. In this case -EINTR is returned
and it is expected that process re-invokes syscall. However, there are
a few problems with that:
 * looks like nobody bothers checking return value from cacheflush
 * but if it did, we don't provide the restart address for that, so the
   process has to use the same range again
 * ...and again, what might lead to looping forever

So, remove cacheflush restarting code and terminate cache flushing
as early as fatal signal is pending.

Reported-by: Chanho Min <chanho.min@lge.com>
Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm/include/asm/thread_info.h
arch/arm/kernel/traps.c