]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
x86: initialize io_bitmap_base on 32bit
authorThomas Gleixner <tglx@linutronix.de>
Fri, 1 May 2009 18:59:25 +0000 (20:59 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 1 May 2009 19:09:53 +0000 (21:09 +0200)
commit db949bba3c7cf2e664ac12e237c6d4c914f0c69d (x86-32: use non-lazy
io bitmap context switching) broke ioperm for 32bit because it removed
the lazy initialization of io_bitmap_base and did not set it to the
real bitmap offset.

[ Impact: fix non-working sys_ioperm() on 32-bit kernels ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/common.c

index c4f667896c28f1a3eb7e6ae33341f5ba98f74c98..c1caefc82e62512245f52b17251af69d2b2d2c2b 100644 (file)
@@ -1203,6 +1203,8 @@ void __cpuinit cpu_init(void)
        load_TR_desc();
        load_LDT(&init_mm.context);
 
+       t->x86_tss.io_bitmap_base = offsetof(struct tss_struct, io_bitmap);
+
 #ifdef CONFIG_DOUBLEFAULT
        /* Set up doublefault TSS pointer in the GDT */
        __set_tss_desc(cpu, GDT_ENTRY_DOUBLEFAULT_TSS, &doublefault_tss);