mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] consolidate sys_shmat
Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
434498d532
commit
7d87e14c23
17 changed files with 21 additions and 106 deletions
14
ipc/shm.c
14
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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue