patch-2.1.26 linux/arch/i386/kernel/ioport.c
Next file: linux/arch/i386/kernel/sys_i386.c
Previous file: linux/arch/i386/defconfig
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Tue Feb 4 16:44:24 1997
- Orig file:
v2.1.25/linux/arch/i386/kernel/ioport.c
- Orig date:
Tue Jan 28 18:49:46 1997
diff -u --recursive --new-file v2.1.25/linux/arch/i386/kernel/ioport.c linux/arch/i386/kernel/ioport.c
@@ -53,19 +53,13 @@
*/
asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
{
- int ret = -EINVAL;
-
- lock_kernel();
if ((from + num <= from) || (from + num > IO_BITMAP_SIZE*32))
- goto out;
- ret = -EPERM;
+ return -EINVAL;
if (!suser())
- goto out;
+ return -EPERM;
+
set_bitmap((unsigned long *)current->tss.io_bitmap, from, num, !turn_on);
- ret = 0;
-out:
- unlock_kernel();
- return ret;
+ return 0;
}
unsigned int *stack;
@@ -80,23 +74,18 @@
* on system-call entry - see also fork() and the signal handling
* code.
*/
+
asmlinkage int sys_iopl(long ebx,long ecx,long edx,
long esi, long edi, long ebp, long eax, long ds,
long es, long orig_eax, long eip, long cs,
long eflags, long esp, long ss)
{
unsigned int level = ebx;
- int ret = -EINVAL;
- lock_kernel();
if (level > 3)
- goto out;
- ret = -EPERM;
+ return -EINVAL;
if (!suser())
- goto out;
+ return -EPERM;
*(&eflags) = (eflags & 0xffffcfff) | (level << 12);
- ret = 0;
-out:
- unlock_kernel();
- return ret;
+ return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov