]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/pti: Check the return value of pti_user_pagetable_walk_pmd()
authorJiang Biao <jiang.biao2@zte.com.cn>
Fri, 20 Jul 2018 00:06:32 +0000 (08:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Sep 2018 06:38:05 +0000 (08:38 +0200)
commit16939943660cb459ac5abd76f7ed75a53cb48eb1
tree9414413a0d55424fa38e637a47477b4580a9f876
parent36d6a43a16e5ee79917ae58b85d5df8283483c1d
x86/pti: Check the return value of pti_user_pagetable_walk_pmd()

[ Upstream commit 8c934e01a7ce685d98e970880f5941d79272c654 ]

pti_user_pagetable_walk_pmd() can return NULL, so the return value should
be checked to prevent a NULL pointer dereference.

Add the check and a warning when the PMD allocation fails.

Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: dave.hansen@linux.intel.com
Cc: luto@kernel.org
Cc: hpa@zytor.com
Cc: albcamus@gmail.com
Cc: zhong.weidong@zte.com.cn
Link: https://lkml.kernel.org/r/1532045192-49622-2-git-send-email-jiang.biao2@zte.com.cn
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/mm/pti.c