public inbox for linux-edac@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/mce: remove unused mce_vaddr
@ 2023-05-28 11:35 Miaohe Lin
  2023-05-30 19:16 ` Alison Schofield
  0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2023-05-28 11:35 UTC (permalink / raw)
  To: tony.luck, bp, tglx, mingo, dave.hansen
  Cc: hpa, x86, linux-edac, linux-kernel, linmiaohe

Since commit a6e3cf70b772 ("x86/mce: Change to not send SIGBUS error during
copy from user"), mce_vaddr is not used anymore. Remove it and clean up the
relevant code.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 arch/x86/kernel/cpu/mce/severity.c | 7 +------
 include/linux/sched.h              | 1 -
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/x86/kernel/cpu/mce/severity.c b/arch/x86/kernel/cpu/mce/severity.c
index c4477162c07d..0acc0039de81 100644
--- a/arch/x86/kernel/cpu/mce/severity.c
+++ b/arch/x86/kernel/cpu/mce/severity.c
@@ -252,12 +252,7 @@ static bool is_copy_from_user(struct pt_regs *regs)
 		return false;
 	}
 
-	if (fault_in_kernel_space(addr))
-		return false;
-
-	current->mce_vaddr = (void __user *)addr;
-
-	return true;
+	return !fault_in_kernel_space(addr);
 }
 
 /*
diff --git a/include/linux/sched.h b/include/linux/sched.h
index eed5d65b8d1f..3054a7087230 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1493,7 +1493,6 @@ struct task_struct {
 #endif
 
 #ifdef CONFIG_X86_MCE
-	void __user			*mce_vaddr;
 	__u64				mce_kflags;
 	u64				mce_addr;
 	__u64				mce_ripv : 1,
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-06-03  3:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-28 11:35 [PATCH] x86/mce: remove unused mce_vaddr Miaohe Lin
2023-05-30 19:16 ` Alison Schofield
2023-06-03  3:17   ` Miaohe Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox