Revision 38860b2c8bb1b92f61396eb06a63adff916fc31d authored by John David Anglin on 08 November 2021, 21:48:16 UTC, committed by Helge Deller on 13 November 2021, 21:10:56 UTC
For years, there have been random segmentation faults in userspace on SMP PA-RISC machines. It occurred to me that this might be a problem in set_pte_at(). MIPS and some other architectures do cache flushes when installing PTEs with the present bit set. Here I have adapted the code in update_mmu_cache() to flush the kernel mapping when the kernel flush is deferred, or when the kernel mapping may alias with the user mapping. This simplifies calls to update_mmu_cache(). I also changed the barrier in set_pte() from a compiler barrier to a full memory barrier. I know this change is not sufficient to fix the problem. It might not be needed. I have had a few days of operation with 5.14.16 to 5.15.1 and haven't seen any random segmentation faults on rp3440 or c8000 so far. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de> Cc: stable@kernel.org # 5.12+
1 parent f0d1cfa
File | Mode | Size |
---|---|---|
Kconfig | -rw-r--r-- | 3.3 KB |
Makefile | -rw-r--r-- | 778 bytes |
affinity.c | -rw-r--r-- | 12.9 KB |
autoprobe.c | -rw-r--r-- | 4.6 KB |
chip.c | -rw-r--r-- | 40.1 KB |
cpuhotplug.c | -rw-r--r-- | 6.6 KB |
debug.h | -rw-r--r-- | 1.2 KB |
debugfs.c | -rw-r--r-- | 7.0 KB |
devres.c | -rw-r--r-- | 7.9 KB |
dummychip.c | -rw-r--r-- | 1.3 KB |
generic-chip.c | -rw-r--r-- | 16.4 KB |
handle.c | -rw-r--r-- | 6.3 KB |
internals.h | -rw-r--r-- | 14.2 KB |
ipi.c | -rw-r--r-- | 9.1 KB |
irq_sim.c | -rw-r--r-- | 6.2 KB |
irqdesc.c | -rw-r--r-- | 22.2 KB |
irqdomain.c | -rw-r--r-- | 52.0 KB |
manage.c | -rw-r--r-- | 76.8 KB |
matrix.c | -rw-r--r-- | 13.2 KB |
migration.c | -rw-r--r-- | 3.1 KB |
msi.c | -rw-r--r-- | 18.0 KB |
pm.c | -rw-r--r-- | 6.4 KB |
proc.c | -rw-r--r-- | 13.1 KB |
resend.c | -rw-r--r-- | 4.4 KB |
settings.h | -rw-r--r-- | 4.9 KB |
spurious.c | -rw-r--r-- | 12.3 KB |
timings.c | -rw-r--r-- | 25.1 KB |
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...