]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
arm64: vdso: don't free unallocated pages
authorMark Rutland <mark.rutland@arm.com>
Tue, 14 Apr 2020 10:42:48 +0000 (11:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 Apr 2020 07:06:40 +0000 (09:06 +0200)
commitec7bcad7708246af1c2695b1974c7c396a7f46af
treed169208a311dce7e8295c22e9cafb7c8cde0c8f7
parent7eefe1f2056c7a53586ff943309cfdb4a5562934
arm64: vdso: don't free unallocated pages

commit 9cc3d0c6915aee5140f8335d41bbc3ff1b79aa4e upstream.

The aarch32_vdso_pages[] array never has entries allocated in the C_VVAR
or C_VDSO slots, and as the array is zero initialized these contain
NULL.

However in __aarch32_alloc_vdso_pages() when
aarch32_alloc_kuser_vdso_page() fails we attempt to free the page whose
struct page is at NULL, which is obviously nonsensical.

This patch removes the erroneous page freeing.

Fixes: 7c1deeeb0130 ("arm64: compat: VDSO setup for compat layer")
Cc: <stable@vger.kernel.org> # 5.3.x-
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Acked-by: Will Deacon <will@kernel.org>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/kernel/vdso.c