From: Ian Munsie Date: Mon, 8 Dec 2014 08:17:58 +0000 (+1100) Subject: cxl: Early return from cxl_handle_fault for a shut down context X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13da704682471669685ccc3fe111fd6c0127b2eb;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Ian Munsie Signed-off-by: Michael Ellerman --- diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c index f8684bca2d79..e010302a192b 100644 --- a/drivers/misc/cxl/fault.c +++ b/drivers/misc/cxl/fault.c @@ -180,6 +180,12 @@ void cxl_handle_fault(struct work_struct *fault_work) 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. " "DSISR: %#llx DAR: %#llx\n", ctx->pe, dsisr, dar);