aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 047b823e6bf0..0852f206d895 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -366,9 +366,10 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
366 return error; 366 return error;
367 } 367 }
368 368
369 sprintf (name, "SYSV%08x", key);
369 if (shmflg & SHM_HUGETLB) { 370 if (shmflg & SHM_HUGETLB) {
370 /* hugetlb_zero_setup takes care of mlock user accounting */ 371 /* hugetlb_file_setup takes care of mlock user accounting */
371 file = hugetlb_zero_setup(size); 372 file = hugetlb_file_setup(name, size);
372 shp->mlock_user = current->user; 373 shp->mlock_user = current->user;
373 } else { 374 } else {
374 int acctflag = VM_ACCOUNT; 375 int acctflag = VM_ACCOUNT;
@@ -379,7 +380,6 @@ static int newseg (struct ipc_namespace *ns, key_t key, int shmflg, size_t size)
379 if ((shmflg & SHM_NORESERVE) && 380 if ((shmflg & SHM_NORESERVE) &&
380 sysctl_overcommit_memory != OVERCOMMIT_NEVER) 381 sysctl_overcommit_memory != OVERCOMMIT_NEVER)
381 acctflag = 0; 382 acctflag = 0;
382 sprintf (name, "SYSV%08x", key);
383 file = shmem_file_setup(name, size, acctflag); 383 file = shmem_file_setup(name, size, acctflag);
384 } 384 }
385 error = PTR_ERR(file); 385 error = PTR_ERR(file);