[PATCH] Revert "riscv: mm: accelerate pagefault when badaccess"
Kefeng Wang
wangkefeng.wang at huawei.com
Thu May 30 21:05:43 PDT 2024
On 2024/5/31 0:44, Palmer Dabbelt wrote:
> From: Palmer Dabbelt <palmer at rivosinc.com>
>
> I accidentally picked up an earlier version of this patch, which had
> already landed via mm. The patch I picked up contains a bug, which I
> kept as I thought it was a fix. So let's just revert it.
>
> This reverts commit 4c6c0020427a4547845a83f7e4d6085e16c3e24f.
Yes, this one is the wrong v1.
Reviewed-by: Kefeng Wang <wangkefeng.wang at huawei.com>
>
> Fixes: 4c6c0020427a ("riscv: mm: accelerate pagefault when badaccess")
> Signed-off-by: Palmer Dabbelt <palmer at rivosinc.com>
> ---
> arch/riscv/mm/fault.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/riscv/mm/fault.c b/arch/riscv/mm/fault.c
> index b3fcf7d67efb..5224f3733802 100644
> --- a/arch/riscv/mm/fault.c
> +++ b/arch/riscv/mm/fault.c
> @@ -293,8 +293,8 @@ void handle_page_fault(struct pt_regs *regs)
> if (unlikely(access_error(cause, vma))) {
> vma_end_read(vma);
> count_vm_vma_lock_event(VMA_LOCK_SUCCESS);
> - tsk->thread.bad_cause = SEGV_ACCERR;
> - bad_area_nosemaphore(regs, code, addr);
> + tsk->thread.bad_cause = cause;
> + bad_area_nosemaphore(regs, SEGV_ACCERR, addr);
> return;
> }
>
More information about the linux-riscv
mailing list