]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
s390/gup: add missing TASK_SIZE check to get_user_pages_fast()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Mon, 22 Oct 2012 13:49:02 +0000 (15:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 20:14:11 +0000 (12:14 -0800)
commitfc4cc3fbd6c79a96b38c4d88d07c165e869ef7bf
tree859c3cf2ca74ba0b31674a1a313dc1ef74c5374e
parent8f21eab98e218f6cd38c89ad5952980234c1804d
s390/gup: add missing TASK_SIZE check to get_user_pages_fast()

commit d55c4c613fc4d4ad2ba0fc6fa2b57176d420f7e4 upstream.

When walking page tables we need to make sure that everything
is within bounds of the ASCE limit of the task's address space.
Otherwise we might calculate e.g. a pud pointer which is not
within a pud and dereference it.
So check against TASK_SIZE (which is the ASCE limit) before
walking page tables.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/s390/mm/gup.c