diff options
author | 2024-04-26 10:55:23 -0700 | |
---|---|---|
committer | 2024-04-26 10:55:23 -0700 | |
commit | 09ef2957170db78429acb10b606636f798cbd3cc (patch) | |
tree | d0fe17095ed07c7a813a8e34c77bd5e59cd637f0 /arch/loongarch/mm/fault.c | |
parent | Merge tag 'pwm/for-6.9-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux (diff) | |
parent | LoongArch: Lately init pmu after smp is online (diff) | |
download | wireguard-linux-09ef2957170db78429acb10b606636f798cbd3cc.tar.xz wireguard-linux-09ef2957170db78429acb10b606636f798cbd3cc.zip |
Merge tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
Pull LoongArch fixes from Huacai Chen:
"Fix some build errors and some trivial runtime bugs"
* tag 'loongarch-fixes-6.9-2' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson:
LoongArch: Lately init pmu after smp is online
LoongArch: Fix callchain parse error with kernel tracepoint events
LoongArch: Fix access error when read fault on a write-only VMA
LoongArch: Fix a build error due to __tlb_remove_tlb_entry()
LoongArch: Fix Kconfig item and left code related to CRASH_CORE
Diffstat (limited to 'arch/loongarch/mm/fault.c')
-rw-r--r-- | arch/loongarch/mm/fault.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/loongarch/mm/fault.c b/arch/loongarch/mm/fault.c index 1fc2f6813ea0..97b40defde06 100644 --- a/arch/loongarch/mm/fault.c +++ b/arch/loongarch/mm/fault.c @@ -202,10 +202,10 @@ good_area: if (!(vma->vm_flags & VM_WRITE)) goto bad_area; } else { - if (!(vma->vm_flags & VM_READ) && address != exception_era(regs)) - goto bad_area; if (!(vma->vm_flags & VM_EXEC) && address == exception_era(regs)) goto bad_area; + if (!(vma->vm_flags & (VM_READ | VM_WRITE)) && address != exception_era(regs)) + goto bad_area; } /* |