aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c10
-rw-r--r--ipc/util.c9
2 files changed, 14 insertions, 5 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index b58c651d31ae..587d836d80d9 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -212,8 +212,16 @@ static int newseg (key_t key, int shmflg, size_t size)
212 file = hugetlb_zero_setup(size); 212 file = hugetlb_zero_setup(size);
213 shp->mlock_user = current->user; 213 shp->mlock_user = current->user;
214 } else { 214 } else {
215 int acctflag = VM_ACCOUNT;
216 /*
217 * Do not allow no accounting for OVERCOMMIT_NEVER, even
218 * if it's asked for.
219 */
220 if ((shmflg & SHM_NORESERVE) &&
221 sysctl_overcommit_memory != OVERCOMMIT_NEVER)
222 acctflag = 0;
215 sprintf (name, "SYSV%08x", key); 223 sprintf (name, "SYSV%08x", key);
216 file = shmem_file_setup(name, size, VM_ACCOUNT); 224 file = shmem_file_setup(name, size, acctflag);
217 } 225 }
218 error = PTR_ERR(file); 226 error = PTR_ERR(file);
219 if (IS_ERR(file)) 227 if (IS_ERR(file))
diff --git a/ipc/util.c b/ipc/util.c
index 10e836d0d89e..23f1cec150c1 100644
--- a/ipc/util.c
+++ b/ipc/util.c
@@ -410,7 +410,8 @@ void ipc_rcu_getref(void *ptr)
410} 410}
411 411
412/** 412/**
413 * ipc_schedule_free - free ipc + rcu space 413 * ipc_schedule_free - free ipc + rcu space
414 * @head: RCU callback structure for queued work
414 * 415 *
415 * Since RCU callback function is called in bh, 416 * Since RCU callback function is called in bh,
416 * we need to defer the vfree to schedule_work 417 * we need to defer the vfree to schedule_work
@@ -427,10 +428,10 @@ static void ipc_schedule_free(struct rcu_head *head)
427} 428}
428 429
429/** 430/**
430 * ipc_immediate_free - free ipc + rcu space 431 * ipc_immediate_free - free ipc + rcu space
431 * 432 * @head: RCU callback structure that contains pointer to be freed
432 * Free from the RCU callback context
433 * 433 *
434 * Free from the RCU callback context
434 */ 435 */
435static void ipc_immediate_free(struct rcu_head *head) 436static void ipc_immediate_free(struct rcu_head *head)
436{ 437{