Skip to content
Commit efb44ff6 authored by Jiantao Shan's avatar Jiantao Shan Committed by Huacai Chen
Browse files

LoongArch: Fix access error when read fault on a write-only VMA



As with most architectures, allow handling of read faults in VMAs that
have VM_WRITE but without VM_READ (WRITE implies READ).

Otherwise, reading before writing a write-only memory will error while
reading after writing everything is fine.

BTW, move the VM_EXEC judgement before VM_READ/VM_WRITE to make logic a
little clearer.

Cc: stable@vger.kernel.org
Fixes: 09cfefb7 ("LoongArch: Add memory management")
Signed-off-by: default avatarJiantao Shan <shanjiantao@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 7ab22b5c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment