Skip to content

Commit

Permalink
[PATCH] reset tss->io_bitmap_owner in sys_ioperm()
Browse files Browse the repository at this point in the history
my patch "x86: initialise tss->io_bitmap_owner to something" (commit ID
d5cd4aa) 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>
  • Loading branch information
bartoldeman authored and Linus Torvalds committed Nov 6, 2005
1 parent 88dcb6c commit f912696
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/i386/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
/*
* Sets the lazy trigger so that the next I/O operation will
* reload the correct bitmap.
* Reset the owner so that a process switch will not set
* tss->io_bitmap_base to IO_BITMAP_OFFSET.
*/
tss->io_bitmap_base = INVALID_IO_BITMAP_OFFSET_LAZY;
tss->io_bitmap_owner = NULL;

put_cpu();

Expand Down

0 comments on commit f912696

Please sign in to comment.