Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 80274
b: refs/heads/master
c: 9718769
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wright authored and Ingo Molnar committed Jan 30, 2008
1 parent f901739 commit 41521aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ccafa59a0061d7c44d15d02403120fd02b52c667
refs/heads/master: 9718769d298f8642d5ef41eb5f55669d7c5b9fd6
6 changes: 4 additions & 2 deletions trunk/arch/x86/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int turn_on)
#ifdef CONFIG_X86_32
asmlinkage long sys_iopl(unsigned long regsp)
{
volatile struct pt_regs *regs = (struct pt_regs *)&regsp;
struct pt_regs *regs = (struct pt_regs *)&regsp;
unsigned int level = regs->bx;
unsigned int old = (regs->flags >> 12) & 3;
struct thread_struct *t = &current->thread;

if (level > 3)
return -EINVAL;
Expand All @@ -127,8 +128,9 @@ asmlinkage long sys_iopl(unsigned long regsp)
if (!capable(CAP_SYS_RAWIO))
return -EPERM;
}
t->iopl = level << 12;
regs->flags = (regs->flags & ~X86_EFLAGS_IOPL) | (level << 12);

set_iopl_mask(t->iopl);
return 0;
}
#else
Expand Down

0 comments on commit 41521aa

Please sign in to comment.