diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
commit | 012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch) | |
tree | 87efc733f9b164e8c85c0336f92c8fb7eff6d183 /arch/sparc64/solaris/misc.c | |
parent | 625a1589d3d6464b5d90b8a0918789e3afffd220 (diff) |
Merge with Linux 2.4.0-test9. Please check DECstation, I had a number
of rejects to fixup while integrating Linus patches. I also found
that this kernel will only boot SMP on Origin; the UP kernel freeze
soon after bootup with SCSI timeout messages. I commit this anyway
since I found that the last CVS versions had the same problem.
Diffstat (limited to 'arch/sparc64/solaris/misc.c')
-rw-r--r-- | arch/sparc64/solaris/misc.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/arch/sparc64/solaris/misc.c b/arch/sparc64/solaris/misc.c index a7edd1876..ca8bf25f3 100644 --- a/arch/sparc64/solaris/misc.c +++ b/arch/sparc64/solaris/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.29 2000/08/14 23:50:31 anton Exp $ +/* $Id: misc.c,v 1.30 2000/08/29 07:01:54 davem Exp $ * misc.c: Miscelaneous syscall emulation for Solaris * * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -139,12 +139,14 @@ asmlinkage int solaris_brk(u32 brk) int i, len = (countfrom) ? \ ((sizeof(to) > sizeof(from) ? \ sizeof(from) : sizeof(to))) : sizeof(to); \ - copy_to_user_ret(to, from, len, -EFAULT); \ + if (copy_to_user(to, from, len)) \ + return -EFAULT; \ if (dotchop) \ for (p=from,i=0; *p && *p != '.' && --len; p++,i++); \ else \ i = len - 1; \ - __put_user_ret('\0', (char *)(to+i), -EFAULT); \ + if (__put_user('\0', (char *)(to+i))) \ + return -EFAULT; \ } struct sol_uname { @@ -297,10 +299,13 @@ asmlinkage int solaris_sysinfo(int cmd, u32 buf, s32 count) } len = strlen(r) + 1; if (count < len) { - copy_to_user_ret((char *)A(buf), r, count - 1, -EFAULT); - __put_user_ret(0, (char *)A(buf) + count - 1, -EFAULT); - } else - copy_to_user_ret((char *)A(buf), r, len, -EFAULT); + if (copy_to_user((char *)A(buf), r, count - 1) || + __put_user(0, (char *)A(buf) + count - 1)) + return -EFAULT; + } else { + if (copy_to_user((char *)A(buf), r, len)) + return -EFAULT; + } return len; } |