arm64: mm: fix thinko in non-global page table attribute check
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 23 Feb 2018 18:04:48 +0000 (18:04 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Mar 2018 09:54:32 +0000 (10:54 +0100)
commitc1badd7b65c41b4742a9719b13be623fc3cfdcaf
tree0cef1cb05eda555be97f8c19af21ca72abcd9370
parent3da2a62a61d1d228228894b16021e85cccdbe173
arm64: mm: fix thinko in non-global page table attribute check

commit 753e8abc36b2c966caea075db0c845563c8a19bf upstream.

The routine pgattr_change_is_safe() was extended in commit 4e6020565596
("arm64: mm: Permit transitioning from Global to Non-Global without BBM")
to permit changing the nG attribute from not set to set, but did so in a
way that inadvertently disallows such changes if other permitted attribute
changes take place at the same time. So update the code to take this into
account.

Fixes: 4e6020565596 ("arm64: mm: Permit transitioning from Global to ...")
Cc: <stable@vger.kernel.org> # 4.14.x-
Acked-by: Mark Rutland <mark.rutland@arm.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/arm64/mm/mmu.c