diff options
Diffstat (limited to 'include/linux/shm.h')
-rw-r--r-- | include/linux/shm.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/shm.h b/include/linux/shm.h index 2bbafacfbfc9..3ef303df784e 100644 --- a/include/linux/shm.h +++ b/include/linux/shm.h @@ -20,9 +20,18 @@ struct shmid_kernel /* private to the kernel */ pid_t shm_lprid; struct user_struct *mlock_user; - /* The task created the shm object. NULL if the task is dead. */ + /* + * The task created the shm object, for + * task_lock(shp->shm_creator) + */ struct task_struct *shm_creator; - struct list_head shm_clist; /* list by creator */ + + /* + * List by creator. task_lock(->shm_creator) required for read/write. + * If list_empty(), then the creator is dead already. + */ + struct list_head shm_clist; + struct ipc_namespace *ns; } __randomize_layout; /* shm_mode upper byte flags */ |