[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1418026681-14787-4-git-send-email-imunsie@au.ibm.com>
Date: Mon, 8 Dec 2014 19:17:58 +1100
From: "Ian Munsie" <imunsie@....ibm.com>
To: mpe <mpe@...erman.id.au>
Cc: greg <greg@...ah.com>, arnd <arnd@...db.de>,
benh <benh@...nel.crashing.org>, mikey <mikey@...ling.org>,
anton <anton@...ba.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linuxppc-dev <linuxppc-dev@...abs.org>, jk <jk@...abs.org>,
imunsie <imunsie@....ibm.com>,
cbe-oss-dev <cbe-oss-dev@...ts.ozlabs.org>,
"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>
Subject: [PATCH 4/7] CXL: Early return from cxl_handle_fault for a shut down context
From: Ian Munsie <imunsie@....ibm.com>
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 <imunsie@....ibm.com>
---
drivers/misc/cxl/fault.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/misc/cxl/fault.c b/drivers/misc/cxl/fault.c
index c99e896..3e8c06a 100644
--- a/drivers/misc/cxl/fault.c
+++ b/drivers/misc/cxl/fault.c
@@ -176,6 +176,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);
--
2.1.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists