Commit a369cc13 authored by David S. Miller's avatar David S. Miller

[SPARC64]: In sysv IPC translation, mask out IPC_64 as appropriate.

Based upon a patch from Keith M Wesolowski <wesolows@foobazco.org>
parent f3febd73
...@@ -388,7 +388,7 @@ struct shmid64_ds32 { ...@@ -388,7 +388,7 @@ struct shmid64_ds32 {
* *
* This is really horribly ugly. * This is really horribly ugly.
*/ */
#define IPCOP_MASK(__x) (1UL << (__x)) #define IPCOP_MASK(__x) (1UL << ((__x)&~IPC_64))
static int do_sys32_semctl(int first, int second, int third, void *uptr) static int do_sys32_semctl(int first, int second, int third, void *uptr)
{ {
union semun fourth; union semun fourth;
...@@ -400,7 +400,7 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr) ...@@ -400,7 +400,7 @@ static int do_sys32_semctl(int first, int second, int third, void *uptr)
err = -EFAULT; err = -EFAULT;
if (get_user (pad, (u32 *)uptr)) if (get_user (pad, (u32 *)uptr))
goto out; goto out;
if(third == SETVAL) if ((third & ~IPC_64) == SETVAL)
fourth.val = (int)pad; fourth.val = (int)pad;
else else
fourth.__pad = (void *)A(pad); fourth.__pad = (void *)A(pad);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment