Commit 13da7046 authored by Ian Munsie's avatar Ian Munsie Committed by Michael Ellerman

cxl: Early return from cxl_handle_fault for a shut down context

If a context is being detached and we get a translation fault for it
there is little point getting it's mm and handling the fault, so just
respond with an address error and return earlier.
Signed-off-by: default avatarIan Munsie <imunsie@au1.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 456295e2
...@@ -180,6 +180,12 @@ void cxl_handle_fault(struct work_struct *fault_work) ...@@ -180,6 +180,12 @@ void cxl_handle_fault(struct work_struct *fault_work)
return; return;
} }
/* Early return if the context is being / has been detached */
if (ctx->status == CLOSED) {
cxl_ack_ae(ctx);
return;
}
pr_devel("CXL BOTTOM HALF handling fault for afu pe: %i. " pr_devel("CXL BOTTOM HALF handling fault for afu pe: %i. "
"DSISR: %#llx DAR: %#llx\n", ctx->pe, dsisr, dar); "DSISR: %#llx DAR: %#llx\n", ctx->pe, dsisr, dar);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment