Commit efb44ff
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: [email protected]
Fixes: 09cfefb ("LoongArch: Add memory management")
Signed-off-by: Jiantao Shan <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>1 parent 7ab22b5 commit efb44ff
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
206 | | - | |
207 | 205 | | |
208 | 206 | | |
| 207 | + | |
| 208 | + | |
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| |||
0 commit comments