summaryrefslogtreecommitdiffstats
path: root/arch/mips64/kernel/linux32.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-04-05 04:55:58 +0000
commit74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch)
tree7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /arch/mips64/kernel/linux32.c
parentee6374c8b0d333c08061c6a97bc77090d7461225 (diff)
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to switch to another getty like getty_ps. This commit also includes a fix for a setitimer bug which did prevent getty_ps from working on older kernels.
Diffstat (limited to 'arch/mips64/kernel/linux32.c')
-rw-r--r--arch/mips64/kernel/linux32.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/mips64/kernel/linux32.c b/arch/mips64/kernel/linux32.c
index f1a6084e5..206f09377 100644
--- a/arch/mips64/kernel/linux32.c
+++ b/arch/mips64/kernel/linux32.c
@@ -443,10 +443,10 @@ sys32_execve(abi64_no_regargs, struct pt_regs regs)
* `execve' frees all current memory we only have to do an
* `munmap' if the `execve' failes.
*/
- down(&current->mm->mmap_sem);
+ down_write(&current->mm->mmap_sem);
av = (char **) do_mmap_pgoff(0, 0, len, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANONYMOUS, 0);
- up(&current->mm->mmap_sem);
+ up_write(&current->mm->mmap_sem);
if (IS_ERR(av))
return (long) av;
@@ -742,7 +742,9 @@ sys32_getrusage(int who, struct rusage32 *ru)
set_fs (KERNEL_DS);
ret = sys_getrusage(who, &r);
set_fs (old_fs);
- if (put_rusage (ru, &r)) return -EFAULT;
+ if (put_rusage (ru, &r))
+ return -EFAULT;
+
return ret;
}
@@ -752,7 +754,6 @@ get_tv32(struct timeval *o, struct timeval32 *i)
return (!access_ok(VERIFY_READ, i, sizeof(*i)) ||
(__get_user(o->tv_sec, &i->tv_sec) |
__get_user(o->tv_usec, &i->tv_usec)));
- return ENOSYS;
}
static inline long
@@ -763,7 +764,6 @@ get_it32(struct itimerval *o, struct itimerval32 *i)
__get_user(o->it_interval.tv_usec, &i->it_interval.tv_usec) |
__get_user(o->it_value.tv_sec, &i->it_value.tv_sec) |
__get_user(o->it_value.tv_usec, &i->it_value.tv_usec)));
- return ENOSYS;
}
static inline long
@@ -777,12 +777,11 @@ put_tv32(struct timeval32 *o, struct timeval *i)
static inline long
put_it32(struct itimerval32 *o, struct itimerval *i)
{
- return (!access_ok(VERIFY_WRITE, i, sizeof(*i)) ||
+ return (!access_ok(VERIFY_WRITE, o, sizeof(*o)) ||
(__put_user(i->it_interval.tv_sec, &o->it_interval.tv_sec) |
__put_user(i->it_interval.tv_usec, &o->it_interval.tv_usec) |
__put_user(i->it_value.tv_sec, &o->it_value.tv_sec) |
__put_user(i->it_value.tv_usec, &o->it_value.tv_usec)));
- return ENOSYS;
}
extern int do_getitimer(int which, struct itimerval *value);
@@ -839,6 +838,7 @@ sys32_alarm(unsigned int seconds)
/* And we'd better return too much than too little anyway */
if (it_old.it_value.tv_usec)
oldalarm++;
+
return oldalarm;
}