summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/shmctl.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
committerThomas Schwinge <thomas@codesourcery.com>2013-05-23 23:37:00 +0200
commitf9e888643115b4b2f28853ebd1733f4410fb8839 (patch)
tree58c69f6cef623679080e8933b6c79880bfbd7cb8 /sysdeps/unix/sysv/linux/shmctl.c
parentd78eef6ebc008f784f501ce208bef12c6eafda27 (diff)
parentb934acf0e93c5a220551ed6e686bb9d45a24a8cc (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'sysdeps/unix/sysv/linux/shmctl.c')
-rw-r--r--sysdeps/unix/sysv/linux/shmctl.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c
index 01dbdd087d..34806fbb6b 100644
--- a/sysdeps/unix/sysv/linux/shmctl.c
+++ b/sysdeps/unix/sysv/linux/shmctl.c
@@ -25,7 +25,6 @@
#include <sys/syscall.h>
#include <bits/wordsize.h>
#include <shlib-compat.h>
-#include <bp-checks.h>
#include <kernel-features.h>
@@ -40,8 +39,8 @@ struct __old_shmid_ds
__ipc_pid_t shm_lpid; /* pid of last shmop */
unsigned short int shm_nattch; /* number of current attaches */
unsigned short int __shm_npages; /* size of segment (pages) */
- unsigned long int *__unbounded __shm_pages; /* array of ptrs to frames -> SHMMAX */
- struct vm_area_struct *__unbounded __attaches; /* descriptors for attaches */
+ unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
+ struct vm_area_struct *__attaches; /* descriptors for attaches */
};
struct __old_shminfo
@@ -64,8 +63,7 @@ int
attribute_compat_text_section
__old_shmctl (int shmid, int cmd, struct __old_shmid_ds *buf)
{
- return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid,
- cmd, 0, CHECK_1_NULL_OK (buf));
+ return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf);
}
compat_symbol (libc, __old_shmctl, shmctl, GLIBC_2_0);
#endif
@@ -75,7 +73,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
{
#if __ASSUME_IPC64 > 0
return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
- CHECK_1 (buf));
+ buf);
#else
switch (cmd) {
case SHM_STAT:
@@ -86,8 +84,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
#endif
break;
default:
- return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0,
- CHECK_1 (buf));
+ return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, buf);
}
{
@@ -101,7 +98,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
/* Unfortunately there is no way how to find out for sure whether
we should use old or new shmctl. */
result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
- CHECK_1 (buf));
+ buf);
if (result != -1 || errno != EINVAL)
return result;
@@ -118,8 +115,7 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
return -1;
}
}
- result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0,
- __ptrvalue (&old.ds));
+ result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, &old.ds);
if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT))
{
memset(buf, 0, sizeof(*buf));