* [PATCH] parisc: Fix set_fixmap() on PA1.x CPUs
@ 2021-11-13 22:06 Helge Deller
2021-11-15 12:38 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2021-11-13 22:06 UTC (permalink / raw)
To: stable; +Cc: gregkh
Upstream commit 6e866a462867b60841202e900f10936a0478608c failed to
apply to kernel v5.2 up to v5.4.
Below is the fixed backport patch.
Please apply to v5.2 up to v5.4.
Thanks,
Helge
--------------------
From: Helge Deller <deller@gmx.de>
Date: Sun, 31 Oct 2021 21:58:12 +0100
Subject: [PATCH] parisc: Fix set_fixmap() on PA1.x CPUs
Upstream commit: 6e866a462867b60841202e900f10936a0478608c
Fix a kernel crash which happens on PA1.x CPUs while initializing the
FTRACE/KPROBE breakpoints. The PTE table entries for the fixmap area
were not created correctly.
Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: ccfbc68d41c2 ("parisc: add set_fixmap()/clear_fixmap()")
Cc: stable@vger.kernel.org # v5.2+
diff --git a/arch/parisc/mm/fixmap.c b/arch/parisc/mm/fixmap.c
index 474cd241c150..02e19a32e6c5 100644
--- a/arch/parisc/mm/fixmap.c
+++ b/arch/parisc/mm/fixmap.c
@@ -18,12 +18,9 @@ void notrace set_fixmap(enum fixed_addresses idx, phys_addr_t phys)
pte_t *pte;
if (pmd_none(*pmd))
- pmd = pmd_alloc(NULL, pgd, vaddr);
-
- pte = pte_offset_kernel(pmd, vaddr);
- if (pte_none(*pte))
pte = pte_alloc_kernel(pmd, vaddr);
+ pte = pte_offset_kernel(pmd, vaddr);
set_pte_at(&init_mm, vaddr, pte, __mk_pte(phys, PAGE_KERNEL_RWX));
flush_tlb_kernel_range(vaddr, vaddr + PAGE_SIZE);
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] parisc: Fix set_fixmap() on PA1.x CPUs
2021-11-13 22:06 [PATCH] parisc: Fix set_fixmap() on PA1.x CPUs Helge Deller
@ 2021-11-15 12:38 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2021-11-15 12:38 UTC (permalink / raw)
To: Helge Deller; +Cc: stable
On Sat, Nov 13, 2021 at 11:06:43PM +0100, Helge Deller wrote:
> Upstream commit 6e866a462867b60841202e900f10936a0478608c failed to
> apply to kernel v5.2 up to v5.4.
> Below is the fixed backport patch.
> Please apply to v5.2 up to v5.4.
Now queued up, thanks.
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-15 12:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-13 22:06 [PATCH] parisc: Fix set_fixmap() on PA1.x CPUs Helge Deller
2021-11-15 12:38 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).