]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/mm: Fix vmalloc_fault to use pXd_large
authorToshi Kani <toshi.kani@hpe.com>
Tue, 13 Mar 2018 17:03:46 +0000 (11:03 -0600)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 23 May 2018 01:33:47 +0000 (21:33 -0400)
commit3faa9444d8d2f424510fd290ae8988962b286fd0
treecb4c59701a4c07a2e32534cf9612cff38dc9ead3
parent92629b00410a381d10bb0b251d557042c76ce540
x86/mm: Fix vmalloc_fault to use pXd_large

[ Upstream commit 18a955219bf7d9008ce480d4451b6b8bf4483a22 ]

Gratian Crisan reported that vmalloc_fault() crashes when CONFIG_HUGETLBFS
is not set since the function inadvertently uses pXn_huge(), which always
return 0 in this case.  ioremap() does not depend on CONFIG_HUGETLBFS.

Fix vmalloc_fault() to call pXd_large() instead.

Fixes: f4eafd8bcd52 ("x86/mm: Fix vmalloc_fault() to handle large pages properly")
Reported-by: Gratian Crisan <gratian.crisan@ni.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: Borislav Petkov <bp@alien8.de>
Cc: Andy Lutomirski <luto@kernel.org>
Link: https://lkml.kernel.org/r/20180313170347.3829-2-toshi.kani@hpe.com
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
arch/x86/mm/fault.c