|
@@ -436,7 +436,7 @@ out:
|
|
asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
|
|
asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
|
|
unsigned long third, void __user *ptr, long fifth)
|
|
unsigned long third, void __user *ptr, long fifth)
|
|
{
|
|
{
|
|
- int err;
|
|
|
|
|
|
+ long err;
|
|
|
|
|
|
/* No need for backward compatibility. We can start fresh... */
|
|
/* No need for backward compatibility. We can start fresh... */
|
|
if (call <= SEMCTL) {
|
|
if (call <= SEMCTL) {
|
|
@@ -453,16 +453,9 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
|
|
err = sys_semget(first, (int)second, (int)third);
|
|
err = sys_semget(first, (int)second, (int)third);
|
|
goto out;
|
|
goto out;
|
|
case SEMCTL: {
|
|
case SEMCTL: {
|
|
- union semun fourth;
|
|
|
|
- err = -EINVAL;
|
|
|
|
- if (!ptr)
|
|
|
|
- goto out;
|
|
|
|
- err = -EFAULT;
|
|
|
|
- if (get_user(fourth.__pad,
|
|
|
|
- (void __user * __user *) ptr))
|
|
|
|
- goto out;
|
|
|
|
- err = sys_semctl(first, (int)second | IPC_64,
|
|
|
|
- (int)third, fourth);
|
|
|
|
|
|
+ err = sys_semctl(first, third,
|
|
|
|
+ (int)second | IPC_64,
|
|
|
|
+ (union semun) ptr);
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
default:
|
|
default:
|