summaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2005-05-01 19:59:12 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-01 19:59:12 +0400
commit7d87e14c236d6c4cab66d87cf0bc1e0f0375d308 (patch)
tree0c0826cdc102286b541e3e56b59c81752d34c90d /ipc
parent434498d5323445b59167fd7aa5633b74ebbce901 (diff)
downloadlinux-7d87e14c236d6c4cab66d87cf0bc1e0f0375d308.tar.xz
[PATCH] consolidate sys_shmat
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 06cd5c91056f..cce022435dbc 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -28,6 +28,8 @@
#include <linux/security.h>
#include <linux/syscalls.h>
#include <linux/audit.h>
+#include <linux/ptrace.h>
+
#include <asm/uaccess.h>
#include "util.h"
@@ -771,6 +773,18 @@ out:
return err;
}
+asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg)
+{
+ unsigned long ret;
+ long err;
+
+ err = do_shmat(shmid, shmaddr, shmflg, &ret);
+ if (err)
+ return err;
+ force_successful_syscall_return();
+ return (long)ret;
+}
+
/*
* detach and kill segment if marked destroyed.
* The work is done in shm_close.