On Wed, Apr 24, 2013 at 07:13:08PM -0400, Naoya Horiguchi wrote: > On Wed, Apr 24, 2013 at 07:05:35PM -0400, Naoya Horiguchi wrote: > ... > > diff --git a/ipc/shm.c b/ipc/shm.c > > index cb858df..e2cb809 100644 > > --- a/ipc/shm.c > > +++ b/ipc/shm.c > > @@ -494,7 +494,7 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params) > > /* 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, NULL, acctflag, > > &shp->mlock_user, HUGETLB_SHMFS_INODE, > > (shmflg >> SHM_HUGE_SHIFT) & SHM_HUGE_MASK); > > } else { > > Ugh, NULL is not correct, it should be &size. No, shm does not want its size variable aligned, it wants the segment to be the originally requested size... only mmap uses the aligned size later on. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>