summaryrefslogtreecommitdiff
path: root/arch/s390/lib/uaccess_pt.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-03 00:39:07 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-03 00:39:07 (GMT)
commit06749f192b740651302a84273707d0b66749d126 (patch)
treef79f6bd1f8a8a0b63b624d78bedc5c00650f1383 /arch/s390/lib/uaccess_pt.c
parent931cf48d2db64c67d0e917f55d7db7ab7b9fefa3 (diff)
parentdc1ccc48159d63eca5089e507c82c7d22ef60839 (diff)
downloadlinux-06749f192b740651302a84273707d0b66749d126.tar.xz
Merge v3.13-rc2 into staging-next
we want these fixes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390/lib/uaccess_pt.c')
-rw-r--r--arch/s390/lib/uaccess_pt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/s390/lib/uaccess_pt.c b/arch/s390/lib/uaccess_pt.c
index 97e03ca..dbdab3e 100644
--- a/arch/s390/lib/uaccess_pt.c
+++ b/arch/s390/lib/uaccess_pt.c
@@ -78,11 +78,14 @@ static size_t copy_in_kernel(size_t count, void __user *to,
* contains the (negative) exception code.
*/
#ifdef CONFIG_64BIT
+
static unsigned long follow_table(struct mm_struct *mm,
unsigned long address, int write)
{
unsigned long *table = (unsigned long *)__pa(mm->pgd);
+ if (unlikely(address > mm->context.asce_limit - 1))
+ return -0x38UL;
switch (mm->context.asce_bits & _ASCE_TYPE_MASK) {
case _ASCE_TYPE_REGION1:
table = table + ((address >> 53) & 0x7ff);