get rid of union semop in sys_semctl(2) arguments

just have the bugger take unsigned long and deal with SETVAL
case (when we use an int member in the union) explicitly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2013-03-05 15:04:55 -05:00
parent 4b377bab29
commit e1fd1f490f
7 changed files with 91 additions and 71 deletions

View File

@@ -33,12 +33,12 @@ SYSCALL_DEFINE6(ipc, unsigned int, call, int, first, unsigned long, second,
case SEMGET:
return sys_semget(first, second, third);
case SEMCTL: {
union semun fourth;
unsigned long arg;
if (!ptr)
return -EINVAL;
if (get_user(fourth.__pad, (void __user * __user *) ptr))
if (get_user(arg, (unsigned long __user *) ptr))
return -EFAULT;
return sys_semctl(first, second, third, fourth);
return sys_semctl(first, second, third, arg);
}
case MSGSND: