Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754603AbaLHITa (ORCPT ); Mon, 8 Dec 2014 03:19:30 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:46428 "EHLO e23smtp08.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754449AbaLHISr (ORCPT ); Mon, 8 Dec 2014 03:18:47 -0500 From: "Ian Munsie" To: mpe Cc: greg , arnd , benh , mikey , anton , linux-kernel , linuxppc-dev , jk , imunsie , cbe-oss-dev , "Aneesh Kumar K.V" Subject: [PATCH 4/7] CXL: Early return from cxl_handle_fault for a shut down context Date: Mon, 8 Dec 2014 19:17:58 +1100 Message-Id: <1418026681-14787-4-git-send-email-imunsie@au.ibm.com> X-Mailer: git-send-email 2.1.3 In-Reply-To: <1418026681-14787-1-git-send-email-imunsie@au.ibm.com> References: <1418026681-14787-1-git-send-email-imunsie@au.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14120808-0029-0000-0000-000000C4C389 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ian Munsie 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 --- 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/