[tip:x86/asm] x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS
From: tip-bot for Mateusz Guzik
Date: Fri May 13 2016 - 07:53:20 EST
Commit-ID: 4afd0565552c87f23834db9121dd9cf6955d0b43
Gitweb: http://git.kernel.org/tip/4afd0565552c87f23834db9121dd9cf6955d0b43
Author: Mateusz Guzik <mguzik@xxxxxxxxxx>
AuthorDate: Tue, 10 May 2016 22:56:43 +0200
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Fri, 13 May 2016 13:50:15 +0200
x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS
This fixes an oversight in:
731e33e39a5b95 ("Remove FSBASE/GSBASE < 4G optimization")
Signed-off-by: Mateusz Guzik <mguzik@xxxxxxxxxx>
Cc: Alexander Shishkin <alexander.shishkin@xxxxxxxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Andy Lutomirski <luto@xxxxxxxxxx>
Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
Cc: Borislav Petkov <bp@xxxxxxxxx>
Cc: Brian Gerst <brgerst@xxxxxxxxx>
Cc: Denys Vlasenko <dvlasenk@xxxxxxxxxx>
Cc: H. Peter Anvin <hpa@xxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Vince Weaver <vincent.weaver@xxxxxxxxx>
Link: http://lkml.kernel.org/r/1462913803-29634-1-git-send-email-mguzik@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
arch/x86/kernel/process_64.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 4285f6a..6b16c36 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -541,6 +541,7 @@ long do_arch_prctl(struct task_struct *task, int code, unsigned long addr)
load_gs_index(0);
ret = wrmsrl_safe(MSR_KERNEL_GS_BASE, addr);
}
+ put_cpu();
break;
case ARCH_SET_FS:
/* Not strictly needed for fs, but do it for symmetry