Lines Matching defs:shmid
150 " key shmid perms size cpid lpid nattch uid gid cuid cgid "
153 " key shmid perms size cpid lpid nattch uid gid cuid "
785 * shmid gets reported as "inode#" in /proc/pid/maps.
989 static int shmctl_down(struct ipc_namespace *ns, int shmid, int cmd, struct shmid64_ds *shmid64)
998 ipcp = ipcctl_obtain_check(ns, &shm_ids(ns), shmid, cmd, &shmid64->shm_perm, 0);
1078 static int shmctl_stat(struct ipc_namespace *ns, int shmid, int cmd, struct shmid64_ds *tbuf)
1087 shp = shm_obtain_object(ns, shmid);
1093 shp = shm_obtain_object_check(ns, shmid);
1163 static int shmctl_do_lock(struct ipc_namespace *ns, int shmid, int cmd)
1170 shp = shm_obtain_object_check(ns, shmid);
1240 static long ksys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf, int version)
1246 if (cmd < 0 || shmid < 0) {
1278 err = shmctl_stat(ns, shmid, cmd, &sem64);
1293 return shmctl_down(ns, shmid, cmd, &sem64);
1296 return shmctl_do_lock(ns, shmid, cmd);
1302 SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
1304 return ksys_shmctl(shmid, cmd, buf, IPC_64);
1308 long ksys_old_shmctl(int shmid, int cmd, struct shmid_ds __user *buf)
1312 return ksys_shmctl(shmid, cmd, buf, version);
1315 SYSCALL_DEFINE3(old_shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf)
1317 return ksys_old_shmctl(shmid, cmd, buf);
1440 static long compat_ksys_shmctl(int shmid, int cmd, void __user *uptr, int version)
1448 if (cmd < 0 || shmid < 0) {
1478 err = shmctl_stat(ns, shmid, cmd, &sem64);
1493 return shmctl_down(ns, shmid, cmd, &sem64);
1496 return shmctl_do_lock(ns, shmid, cmd);
1503 COMPAT_SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, void __user *, uptr)
1505 return compat_ksys_shmctl(shmid, cmd, uptr, IPC_64);
1509 long compat_ksys_old_shmctl(int shmid, int cmd, void __user *uptr)
1513 return compat_ksys_shmctl(shmid, cmd, uptr, version);
1516 COMPAT_SYSCALL_DEFINE3(old_shmctl, int, shmid, int, cmd, void __user *, uptr)
1518 return compat_ksys_old_shmctl(shmid, cmd, uptr);
1530 long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr, unsigned long shmlba)
1546 if (shmid < 0) {
1595 shp = shm_obtain_object_check(ns, shmid);
1694 shp = shm_lock(ns, shmid);
1710 SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg)
1715 err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA);
1729 COMPAT_SYSCALL_DEFINE3(shmat, int, shmid, compat_uptr_t, shmaddr, int, shmflg)
1734 err = do_shmat(shmid, compat_ptr(shmaddr), shmflg, &ret, COMPAT_SHMLBA);