ARM: fix uaccess_with_memcpy() with SW_DOMAIN_PAN
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Dec 2015 13:42:07 +0000 (13:42 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 15 Dec 2015 11:51:02 +0000 (11:51 +0000)
commitc014953d84ec21a4df9a43be2378861ea6e9246e
tree72af8d8752c59bc9c59c96c70616a911f4a107a1
parent77f1b959b0b6db7a7941b4b4f9d3d287c67d7c15
ARM: fix uaccess_with_memcpy() with SW_DOMAIN_PAN

The uaccess_with_memcpy() code is currently incompatible with the SW
PAN code: it takes locks within the region that we've changed the DACR,
potentially sleeping as a result.  As we do not save and restore the
DACR across co-operative sleep events, can lead to an incorrect DACR
value later in this code path.

Reported-by: Peter Rosin <peda@axentia.se>
Tested-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/include/asm/uaccess.h
arch/arm/lib/uaccess_with_memcpy.c