shmget: add "shmflg" checks for SHM_HUGE*

This commit is contained in:
NAKAMURA Gou
2016-03-17 21:47:47 +09:00
parent d65135c040
commit 48167d3223
5 changed files with 39 additions and 5 deletions

View File

@ -136,6 +136,7 @@ int shmobj_create(struct shmid_ds *ds, struct memobj **objp)
obj->ds.shm_perm.seq = the_seq++;
obj->ds.shm_nattch = 1;
obj->index = -1;
obj->pgshift = PAGE_SHIFT;
obj->real_segsz = (obj->ds.shm_segsz + PAGE_SIZE - 1) & PAGE_MASK;
page_list_init(obj);
ihk_mc_spinlock_init(&obj->memobj.lock);