git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git]
/
ipc
/
shm.c
diff --git
a/ipc/shm.c
b/ipc/shm.c
index
13b6b8c
..
6e83b5f
100644
(file)
--- a/
ipc/shm.c
+++ b/
ipc/shm.c
@@
-17,6
+17,7
@@
* Dustin Kirkland <dustin.kirkland@us.ibm.com>
*/
* Dustin Kirkland <dustin.kirkland@us.ibm.com>
*/
+#include <linux/config.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/hugetlb.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/hugetlb.h>
@@
-655,7
+656,7
@@
asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds __user *buf)
err = audit_ipc_obj(&(shp->shm_perm));
if (err)
goto out_unlock_up;
err = audit_ipc_obj(&(shp->shm_perm));
if (err)
goto out_unlock_up;
- err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode);
+ err = audit_ipc_set_perm(0, setbuf.uid, setbuf.gid, setbuf.mode
, &(shp->shm_perm)
);
if (err)
goto out_unlock_up;
err=-EPERM;
if (err)
goto out_unlock_up;
err=-EPERM;
@@
-710,6
+711,7
@@
long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
int err;
unsigned long flags;
unsigned long prot;
int err;
unsigned long flags;
unsigned long prot;
+ unsigned long o_flags;
int acc_mode;
void *user_addr;
int acc_mode;
void *user_addr;
@@
-736,9
+738,11
@@
long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr)
if (shmflg & SHM_RDONLY) {
prot = PROT_READ;
if (shmflg & SHM_RDONLY) {
prot = PROT_READ;
+ o_flags = O_RDONLY;
acc_mode = S_IRUGO;
} else {
prot = PROT_READ | PROT_WRITE;
acc_mode = S_IRUGO;
} else {
prot = PROT_READ | PROT_WRITE;
+ o_flags = O_RDWR;
acc_mode = S_IRUGO | S_IWUGO;
}
if (shmflg & SHM_EXEC) {
acc_mode = S_IRUGO | S_IWUGO;
}
if (shmflg & SHM_EXEC) {