aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/mqueue.c1
-rw-r--r--ipc/msg.c3
-rw-r--r--ipc/shm.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index fd2e26b6f966..85c52fd26bff 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -51,7 +51,6 @@
51#define HARD_MSGMAX (131072/sizeof(void*)) 51#define HARD_MSGMAX (131072/sizeof(void*))
52#define DFLT_MSGSIZEMAX 8192 /* max message size */ 52#define DFLT_MSGSIZEMAX 8192 /* max message size */
53 53
54#define NOTIFY_COOKIE_LEN 32
55 54
56struct ext_wait_queue { /* queue of sleeping tasks */ 55struct ext_wait_queue { /* queue of sleeping tasks */
57 struct task_struct *task; 56 struct task_struct *task;
diff --git a/ipc/msg.c b/ipc/msg.c
index 8c30ec2f6e34..7eec5ed32379 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, int msgflg)
220 ret = -EEXIST; 220 ret = -EEXIST;
221 } else { 221 } else {
222 msq = msg_lock(id); 222 msq = msg_lock(id);
223 if(msq==NULL) 223 BUG_ON(msq==NULL);
224 BUG();
225 if (ipcperms(&msq->q_perm, msgflg)) 224 if (ipcperms(&msq->q_perm, msgflg))
226 ret = -EACCES; 225 ret = -EACCES;
227 else { 226 else {
diff --git a/ipc/shm.c b/ipc/shm.c
index a88c8a02e7f3..6f9615c09fb2 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -814,6 +814,9 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
814 loff_t size = 0; 814 loff_t size = 0;
815 int retval = -EINVAL; 815 int retval = -EINVAL;
816 816
817 if (addr & ~PAGE_MASK)
818 return retval;
819
817 down_write(&mm->mmap_sem); 820 down_write(&mm->mmap_sem);
818 821
819 /* 822 /*