aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Oldeman <bartoldeman@users.sourceforge.net>2005-11-05 18:54:07 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-05 19:31:36 -0500
commitf912696ab330bf539231d1f8032320f2a08b850f (patch)
treed3e4cf70323348b341b894af57a69896c755cac1
parent88dcb6c4113afe93a6c4891ec43bef6a17c83155 (diff)
[PATCH] reset tss->io_bitmap_owner in sys_ioperm()
my patch "x86: initialise tss->io_bitmap_owner to something" (commit ID d5cd4aadd3d220afac8e3e6d922e333592551f7d) introduced a problem with a program (DOSEMU) that called ioperm after already doing some port i/o. The problem is that a process switch return causes tss->io_bitmap_base to be set to IO_BITMAP_OFFSET so that the fault (that *really* sets the io bitmap) never triggers. This fixes that regression. Signed-off-by: Bart Oldeman <bartoldeman@users.sourceforge.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/kernel/ioport.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c
index f2b37654777f..b59a34dbe262 100644
--- a/arch/i386/kernel/ioport.c
+++ b/arch/i386/kernel/ioport.c
@@ -108,8 +108,11 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
108 /* 108 /*
109 * Sets the lazy trigger so that the next I/O operation will 109 * Sets the lazy trigger so that the next I/O operation will
110 * reload the correct bitmap. 110 * reload the correct bitmap.
111 * Reset the owner so that a process switch will not set
112 * tss->io_bitmap_base to IO_BITMAP_OFFSET.
111 */ 113 */
112 tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY; 114 tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY;
115 tss->io_bitmap_owner = NULL;
113 116
114 put_cpu(); 117 put_cpu();
115 118