diff options
Diffstat (limited to 'ipc/shm.c')
-rw-r--r-- | ipc/shm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 | } |