summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@linux-m68k.org>2019-06-17 23:22:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-07-26 09:11:08 +0200
commit9f6a2e40dc9edb9b5a32639fa20834cc3bd0d692 (patch)
tree2581473a9375a7f0a0220f20a021af340dfa0b62
parent1d2ee2a5757e2e04e90a3d777b391cf7bb8f99b1 (diff)
downloadlinux-stable-9f6a2e40dc9edb9b5a32639fa20834cc3bd0d692.tar.gz
linux-stable-9f6a2e40dc9edb9b5a32639fa20834cc3bd0d692.tar.bz2
linux-stable-9f6a2e40dc9edb9b5a32639fa20834cc3bd0d692.zip
powerpc/mm/32s: fix condition that is always true
commit 46c2478af610efb3212b8b08f74389d69899ef70 upstream. Move a misplaced paren that makes the condition always true. Fixes: 63b2bc619565 ("powerpc/mm/32s: Use BATs for STRICT_KERNEL_RWX") Cc: stable@vger.kernel.org # v5.1+ Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> Reviewed-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/powerpc/mm/pgtable_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c
index d53188dee18f..35cb96cfc258 100644
--- a/arch/powerpc/mm/pgtable_32.c
+++ b/arch/powerpc/mm/pgtable_32.c
@@ -360,7 +360,7 @@ void mark_initmem_nx(void)
unsigned long numpages = PFN_UP((unsigned long)_einittext) -
PFN_DOWN((unsigned long)_sinittext);
- if (v_block_mapped((unsigned long)_stext) + 1)
+ if (v_block_mapped((unsigned long)_stext + 1))
mmu_mark_initmem_nx();
else
change_page_attr(page, numpages, PAGE_KERNEL);