aboutsummaryrefslogtreecommitdiff
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 fd2e26b6f96..85c52fd26bf 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -51,7 +51,6 @@
#define HARD_MSGMAX (131072/sizeof(void*))
#define DFLT_MSGSIZEMAX 8192 /* max message size */
-#define NOTIFY_COOKIE_LEN 32
struct ext_wait_queue { /* queue of sleeping tasks */
struct task_struct *task;
diff --git a/ipc/msg.c b/ipc/msg.c
index 8c30ec2f6e3..7eec5ed3237 100644
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -220,8 +220,7 @@ asmlinkage long sys_msgget (key_t key, int msgflg)
ret = -EEXIST;
} else {
msq = msg_lock(id);
- if(msq==NULL)
- BUG();
+ BUG_ON(msq==NULL);
if (ipcperms(&msq->q_perm, msgflg))
ret = -EACCES;
else {
diff --git a/ipc/shm.c b/ipc/shm.c
index a88c8a02e7f..6f9615c09fb 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -814,6 +814,9 @@ asmlinkage long sys_shmdt(char __user *shmaddr)
loff_t size = 0;
int retval = -EINVAL;
+ if (addr & ~PAGE_MASK)
+ return retval;
+
down_write(&mm->mmap_sem);
/*