Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39003
b: refs/heads/master
c: 17cca07
h: refs/heads/master
i:
  39001: 505d418
  38999: c239470
v: v3
  • Loading branch information
Matthew Wilcox authored and Matthew Wilcox committed Oct 5, 2006
1 parent 0f91537 commit 5b8c29f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 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: ee9f4b5d95d03d1546f0d06cbe384bd4ab97bcba
refs/heads/master: 17cca07237617a2d712eb44cffd8720055e61291
15 changes: 9 additions & 6 deletions trunk/arch/parisc/kernel/sys_parisc32.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,14 @@ struct __sysctl_args32 {

asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
{
#ifndef CONFIG_SYSCTL_SYSCALL
return -ENOSYS;
#else
struct __sysctl_args32 tmp;
int error;
unsigned int oldlen32;
size_t oldlen, *oldlenp = NULL;
size_t oldlen, __user *oldlenp = NULL;
unsigned long addr = (((long __force)&args->__unused[0]) + 7) & ~7;
extern int do_sysctl(int *name, int nlen, void *oldval, size_t *oldlenp,
void *newval, size_t newlen);

DBG(("sysctl32(%p)\n", args));

Expand All @@ -144,8 +145,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
}

lock_kernel();
error = do_sysctl((int *)(u64)tmp.name, tmp.nlen, (void *)(u64)tmp.oldval,
oldlenp, (void *)(u64)tmp.newval, tmp.newlen);
error = do_sysctl((int __user *)(u64)tmp.name, tmp.nlen,
(void __user *)(u64)tmp.oldval, oldlenp,
(void __user *)(u64)tmp.newval, tmp.newlen);
unlock_kernel();
if (oldlenp) {
if (!error) {
Expand All @@ -157,10 +159,11 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
error = -EFAULT;
}
}
if (copy_to_user(&args->__unused[0], tmp.__unused, sizeof(tmp.__unused)))
if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
error = -EFAULT;
}
return error;
#endif
}

#endif /* CONFIG_SYSCTL */
Expand Down

0 comments on commit 5b8c29f

Please sign in to comment.