summaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-07-08 00:53:00 +0000
commitb8553086288629b4efb77e97f5582e08bc50ad65 (patch)
tree0a19bd1c21e148f35c7a0f76baa4f7a056b966b0 /arch/ia64
parent75b6d92f2dd5112b02f4e78cf9f35f9825946ef0 (diff)
Merge with 2.4.0-test3-pre4.
Diffstat (limited to 'arch/ia64')
-rw-r--r--arch/ia64/config.in1
-rw-r--r--arch/ia64/ia32/sys_ia32.c14
-rw-r--r--arch/ia64/kernel/sys_ia64.c6
3 files changed, 6 insertions, 15 deletions
diff --git a/arch/ia64/config.in b/arch/ia64/config.in
index b9991cfef..e17fbd6af 100644
--- a/arch/ia64/config.in
+++ b/arch/ia64/config.in
@@ -85,6 +85,7 @@ source drivers/parport/Config.in
endmenu
+source drivers/mtd/Config.in
source drivers/pnp/Config.in
source drivers/block/Config.in
source drivers/i2o/Config.in
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index bd925c0e4..95f8b1f54 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -111,12 +111,10 @@ int stack)
* `munmap' if the `execve' failes.
*/
down(&current->mm->mmap_sem);
- lock_kernel();
av = (char **) do_mmap_pgoff(0, 0UL, len, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0);
- unlock_kernel();
up(&current->mm->mmap_sem);
if (IS_ERR(av))
@@ -258,11 +256,15 @@ do_mmap_fake(struct file *file, unsigned long addr, unsigned long len,
return -EINVAL;
if (!file->f_op->read)
return -EINVAL;
+ lock_kernel();
if (file->f_op->llseek) {
- if (file->f_op->llseek(file,off,0) != off)
+ if (file->f_op->llseek(file,off,0) != off) {
+ unlock_kernel();
return -EINVAL;
+ }
} else
file->f_pos = off;
+ unlock_kernel();
r = file->f_op->read(file, (char *)addr, len, &file->f_pos);
return (r < 0) ? -EINVAL : addr;
}
@@ -292,7 +294,6 @@ sys32_mmap(struct mmap_arg_struct *arg)
if (copy_from_user(&a, arg, sizeof(a)))
return -EFAULT;
- lock_kernel();
if (!(a.flags & MAP_ANONYMOUS)) {
error = -EBADF;
file = fget(a.fd);
@@ -302,9 +303,7 @@ sys32_mmap(struct mmap_arg_struct *arg)
a.flags &= ~(MAP_EXECUTABLE | MAP_DENYWRITE);
if ((a.flags & MAP_FIXED) && ((a.addr & ~PAGE_MASK) || (a.offset & ~PAGE_MASK))) {
- unlock_kernel();
error = do_mmap_fake(file, a.addr, a.len, a.prot, a.flags, a.offset);
- lock_kernel();
} else {
down(&current->mm->mmap_sem);
error = do_mmap(file, a.addr, a.len, a.prot, a.flags, a.offset);
@@ -313,7 +312,6 @@ sys32_mmap(struct mmap_arg_struct *arg)
if (file)
fput(file);
out:
- unlock_kernel();
return error;
}
@@ -323,14 +321,12 @@ sys32_pipe(int *fd)
int retval;
int fds[2];
- lock_kernel();
retval = do_pipe(fds);
if (retval)
goto out;
if (copy_to_user(fd, fds, sizeof(fds)))
retval = -EFAULT;
out:
- unlock_kernel();
return retval;
}
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c
index cd9d64fce..c25193cdc 100644
--- a/arch/ia64/kernel/sys_ia64.c
+++ b/arch/ia64/kernel/sys_ia64.c
@@ -83,14 +83,12 @@ sys_pipe (long arg0, long arg1, long arg2, long arg3,
int fd[2];
int retval;
- lock_kernel();
retval = do_pipe(fd);
if (retval)
goto out;
retval = fd[0];
regs->r9 = fd[1];
out:
- unlock_kernel();
return retval;
}
@@ -132,11 +130,7 @@ do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, un
}
down(&current->mm->mmap_sem);
- lock_kernel();
-
addr = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
-
- unlock_kernel();
up(&current->mm->mmap_sem);
if (file)