diff options
-rw-r--r-- | ipc/mqueue.c | 2 | ||||
-rw-r--r-- | ipc/shm.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/ipc/mqueue.c b/ipc/mqueue.c index b6cb06451f4..e4e3f04803c 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -155,7 +155,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, spin_lock(&mq_lock); if (u->mq_bytes + mq_bytes < u->mq_bytes || u->mq_bytes + mq_bytes > - p->signal->rlim[RLIMIT_MSGQUEUE].rlim_cur) { + task_rlimit(p, RLIMIT_MSGQUEUE)) { spin_unlock(&mq_lock); kfree(info->messages); goto out_inode; diff --git a/ipc/shm.c b/ipc/shm.c index 23256b85581..1a314c89f93 100644 --- a/ipc/shm.c +++ b/ipc/shm.c @@ -764,8 +764,7 @@ SYSCALL_DEFINE3(shmctl, int, shmid, int, cmd, struct shmid_ds __user *, buf) if (euid != shp->shm_perm.uid && euid != shp->shm_perm.cuid) goto out_unlock; - if (cmd == SHM_LOCK && - !current->signal->rlim[RLIMIT_MEMLOCK].rlim_cur) + if (cmd == SHM_LOCK && !rlimit(RLIMIT_MEMLOCK)) goto out_unlock; } |