* [PATCH v2] x86/pkeys: Return correctly on a pkey error
@ 2020-02-27 12:57 Aneesh Kumar K.V
0 siblings, 0 replies; only message in thread
From: Aneesh Kumar K.V @ 2020-02-27 12:57 UTC (permalink / raw)
To: linux-kernel; +Cc: dave.hansen, luto, peterz, tglx, Aneesh Kumar K.V
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@linux.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2020-02-27 12:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-27 12:57 [PATCH v2] x86/pkeys: Return correctly on a pkey error Aneesh Kumar K.V
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox