aboutsummaryrefslogtreecommitdiff
path: root/ipc
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-05-29 16:57:02 -0400
committerSteven Rostedt <rostedt@goodmis.org>2013-05-29 16:57:02 -0400
commit0aeb99b9cdc8183299d7b90cb6f57e43272519f8 (patch)
treeae9f10bd5545e0e3a8258ff02cc0aa91d3f4ddba /ipc
parentb9d0069b1e69ea4e5f45ff9e9482aff97669d069 (diff)
parentd9973ea05c48df87d0e18fdec61121930d5cde9d (diff)
Merge tag 'v3.4.46' into v3.4-rt
This is the 3.4.46 stable release Conflicts: kernel/timer.c
Diffstat (limited to 'ipc')
-rw-r--r--ipc/shm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/shm.c b/ipc/shm.c
index 85d81b454e8f..a02ef5781ce9 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -479,10 +479,12 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)
sprintf (name, "SYSV%08x", key);
if (shmflg & SHM_HUGETLB) {
+ size_t hugesize = ALIGN(size, huge_page_size(&default_hstate));
+
/* hugetlb_file_setup applies strict accounting */
if (shmflg & SHM_NORESERVE)
acctflag = VM_NORESERVE;
- file = hugetlb_file_setup(name, 0, size, acctflag,
+ file = hugetlb_file_setup(name, hugesize, acctflag,
&shp->mlock_user, HUGETLB_SHMFS_INODE);
} else {
/*