Merge branch 'bkl/core' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic...
[pandora-kernel.git] / ipc / shm.c
index 23256b8..1a314c8 100644 (file)
--- 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;
                }