diff options
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 b829ab911..007718d51 100644 --- a/arch/loongarch/mm/fault.c +++ b/arch/loongarch/mm/fault.c @@ -193,10 +193,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; } /* |