[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200227125759.63111-1-aneesh.kumar@linux.ibm.com>
Date: Thu, 27 Feb 2020 18:27:59 +0530
From: "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
To: linux-kernel@...r.kernel.org
Cc: dave.hansen@...ux.intel.com, luto@...nel.org, peterz@...radead.org,
tglx@...utronix.de, "Aneesh Kumar K.V" <aneesh.kumar@...ux.ibm.com>
Subject: [PATCH v2] x86/pkeys: Return correctly on a pkey error
This was found by code review
Fixes: 9db812dbb29d ("signal/x86: Call force_sig_pkuerr from __bad_area_nosemaphore")
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@...ux.ibm.com>
---
Changes from V1:
* update commit message
arch/x86/mm/fault.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index fa4ea09593ab..f80a7ad010dc 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -899,8 +899,10 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code,
set_signal_archinfo(address, error_code);
- if (si_code == SEGV_PKUERR)
+ if (si_code == SEGV_PKUERR) {
force_sig_pkuerr((void __user *)address, pkey);
+ return;
+ }
force_sig_fault(SIGSEGV, si_code, (void __user *)address);
--
2.24.1
Powered by blists - more mailing lists