]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/x86/kernel/ioport.c
Merge branch 'rebased-statx' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[karo-tx-linux.git] / arch / x86 / kernel / ioport.c
index 589b3193f1020b8389a5f64b296cff531e85e849..ca49bab3e4677c5ca876907452e05b84136f8a1a 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <linux/sched.h>
+#include <linux/sched/task_stack.h>
 #include <linux/kernel.h>
 #include <linux/capability.h>
 #include <linux/errno.h>
@@ -16,6 +17,7 @@
 #include <linux/syscalls.h>
 #include <linux/bitmap.h>
 #include <asm/syscalls.h>
+#include <asm/desc.h>
 
 /*
  * this changes the io permissions bitmap in the current task.
@@ -45,6 +47,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
                memset(bitmap, 0xff, IO_BITMAP_BYTES);
                t->io_bitmap_ptr = bitmap;
                set_thread_flag(TIF_IO_BITMAP);
+
+               preempt_disable();
+               refresh_TR();
+               preempt_enable();
        }
 
        /*