aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-05 15:04:55 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-03-05 15:14:16 -0500
commite1fd1f490fa4213bd3060efa823a39d299538f72 (patch)
tree8bed18bdf003822ef1a4946e734418cf88546c24 /arch
parent4b377bab29e6a241db42f27541e7fb63713ee178 (diff)
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/parisc/kernel/sys_parisc32.c15
-rw-r--r--arch/parisc/kernel/syscall_table.S2
-rw-r--r--arch/sparc/kernel/sys_sparc_64.c2
3 files changed, 2 insertions, 17 deletions
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c
index 46bdf6080fe4..f517e08e7f0d 100644
--- a/arch/parisc/kernel/sys_parisc32.c
+++ b/arch/parisc/kernel/sys_parisc32.c
@@ -60,21 +60,6 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23,
60 return -ENOSYS; 60 return -ENOSYS;
61} 61}
62 62
63asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg)
64{
65 union semun u;
66
67 if (cmd == SETVAL) {
68 /* Ugh. arg is a union of int,ptr,ptr,ptr, so is 8 bytes.
69 * The int should be in the first 4, but our argument
70 * frobbing has left it in the last 4.
71 */
72 u.val = *((int *)&arg + 1);
73 return sys_semctl (semid, semnum, cmd, u);
74 }
75 return sys_semctl (semid, semnum, cmd, arg);
76}
77
78asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi, 63asmlinkage long compat_sys_fanotify_mark(int fan_fd, int flags, u32 mask_hi,
79 u32 mask_lo, int fd, 64 u32 mask_lo, int fd,
80 const char __user *pathname) 65 const char __user *pathname)
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S
index 30c9a3bba1cc..0c9107285e66 100644
--- a/arch/parisc/kernel/syscall_table.S
+++ b/arch/parisc/kernel/syscall_table.S
@@ -282,7 +282,7 @@
282 ENTRY_COMP(recvmsg) 282 ENTRY_COMP(recvmsg)
283 ENTRY_SAME(semop) /* 185 */ 283 ENTRY_SAME(semop) /* 185 */
284 ENTRY_SAME(semget) 284 ENTRY_SAME(semget)
285 ENTRY_DIFF(semctl) 285 ENTRY_COMP(semctl)
286 ENTRY_COMP(msgsnd) 286 ENTRY_COMP(msgsnd)
287 ENTRY_COMP(msgrcv) 287 ENTRY_COMP(msgrcv)
288 ENTRY_SAME(msgget) /* 190 */ 288 ENTRY_SAME(msgget) /* 190 */
diff --git a/arch/sparc/kernel/sys_sparc_64.c b/arch/sparc/kernel/sys_sparc_64.c
index 42beb6fc4ad8..2daaaa6eda23 100644
--- a/arch/sparc/kernel/sys_sparc_64.c
+++ b/arch/sparc/kernel/sys_sparc_64.c
@@ -353,7 +353,7 @@ SYSCALL_DEFINE6(sparc_ipc, unsigned int, call, int, first, unsigned long, second
353 case SEMCTL: { 353 case SEMCTL: {
354 err = sys_semctl(first, second, 354 err = sys_semctl(first, second,
355 (int)third | IPC_64, 355 (int)third | IPC_64,
356 (union semun) ptr); 356 (unsigned long) ptr);
357 goto out; 357 goto out;
358 } 358 }
359 default: 359 default: