diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/mqueue.c | 1 | ||||
-rw-r--r-- | ipc/msg.c | 3 | ||||
-rw-r--r-- | ipc/shm.c | 3 |
3 files changed, 4 insertions, 3 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index fd2e26b..85c52fd 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; @@ -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 { @@ -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); /* |