x86/arch_prctl/64: Restore accidentally removed put_cpu() in ARCH_SET_GS
authorMateusz Guzik <[email protected]>
Tue, 10 May 2016 20:56:43 +0000 (22:56 +0200)
committerIngo Molnar <[email protected]>
Fri, 13 May 2016 11:50:15 +0000 (13:50 +0200)
This fixes an oversight in:

731e33e39a5b95 ("Remove FSBASE/GSBASE < 4G optimization")

Signed-off-by: Mateusz Guzik <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
arch/x86/kernel/process_64.c

index 4285f6adcc5eec7f7ca8998e2797d5a03c4c8009..6b16c36f0939313dde91d03428cdc855ff3dba9e 100644 (file)
@@ -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