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
History
File Mode Size
6fire
bcd2000
caiaq
hiface
line6
misc
usx2y
Kconfig -rw-r--r-- 4.7 KB
Makefile -rw-r--r-- 817 bytes
card.c -rw-r--r-- 31.5 KB
card.h -rw-r--r-- 8.1 KB
clock.c -rw-r--r-- 15.8 KB
clock.h -rw-r--r-- 474 bytes
endpoint.c -rw-r--r-- 45.7 KB
endpoint.h -rw-r--r-- 2.2 KB
format.c -rw-r--r-- 21.4 KB
format.h -rw-r--r-- 489 bytes
helper.c -rw-r--r-- 2.8 KB
helper.h -rw-r--r-- 1.3 KB
implicit.c -rw-r--r-- 14.5 KB
implicit.h -rw-r--r-- 478 bytes
media.c -rw-r--r-- 8.1 KB
media.h -rw-r--r-- 2.4 KB
midi.c -rw-r--r-- 72.2 KB
midi.h -rw-r--r-- 2.0 KB
mixer.c -rw-r--r-- 98.0 KB
mixer.h -rw-r--r-- 3.8 KB
mixer_maps.c -rw-r--r-- 18.8 KB
mixer_quirks.c -rw-r--r-- 90.3 KB
mixer_quirks.h -rw-r--r-- 655 bytes
mixer_s1810c.c -rw-r--r-- 15.3 KB
mixer_s1810c.h -rw-r--r-- 210 bytes
mixer_scarlett.c -rw-r--r-- 28.1 KB
mixer_scarlett.h -rw-r--r-- 208 bytes
mixer_scarlett_gen2.c -rw-r--r-- 108.1 KB
mixer_scarlett_gen2.h -rw-r--r-- 217 bytes
mixer_us16x08.c -rw-r--r-- 37.3 KB
mixer_us16x08.h -rw-r--r-- 4.0 KB
pcm.c -rw-r--r-- 45.7 KB
pcm.h -rw-r--r-- 540 bytes
power.c -rw-r--r-- 2.5 KB
power.h -rw-r--r-- 924 bytes
proc.c -rw-r--r-- 7.3 KB
proc.h -rw-r--r-- 250 bytes
quirks-table.h -rw-r--r-- 95.6 KB
quirks.c -rw-r--r-- 60.0 KB
quirks.h -rw-r--r-- 1.7 KB
stream.c -rw-r--r-- 32.3 KB
stream.h -rw-r--r-- 325 bytes
usbaudio.h -rw-r--r-- 5.7 KB
validate.c -rw-r--r-- 10.0 KB

back to top