aboutsummaryrefslogtreecommitdiffstats
path: root/ipc/shm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ipc/shm.c')
-rw-r--r--ipc/shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index d88ac5a07ec7..a86a3a5c8a19 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -716,7 +716,7 @@ asmlinkage long sys_shmctl (int shmid, int cmd, struct shmid_ds __user *buf)
716 struct user_struct * user = current->user; 716 struct user_struct * user = current->user;
717 if (!is_file_hugepages(shp->shm_file)) { 717 if (!is_file_hugepages(shp->shm_file)) {
718 err = shmem_lock(shp->shm_file, 1, user); 718 err = shmem_lock(shp->shm_file, 1, user);
719 if (!err) { 719 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)){
720 shp->shm_perm.mode |= SHM_LOCKED; 720 shp->shm_perm.mode |= SHM_LOCKED;
721 shp->mlock_user = user; 721 shp->mlock_user = user;
722 } 722 }