diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-09-08 08:11:07 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-09-08 08:11:34 +0200 |
commit | e2627dce268024aff962132057cb8acb219c9c40 (patch) | |
tree | 52711c41cf957b0fa37d08e627c6370c7aa637fa /include/linux/nsproxy.h | |
parent | 177ef2a6315ea7bf173653182324e1dcd08ffeaa (diff) | |
parent | 2ce7598c9a453e0acd0e07be7be3f5eb39608ebd (diff) | |
download | linux-stable-e2627dce268024aff962132057cb8acb219c9c40.tar.gz linux-stable-e2627dce268024aff962132057cb8acb219c9c40.tar.bz2 linux-stable-e2627dce268024aff962132057cb8acb219c9c40.zip |
Merge tag 'v3.17-rc4' into sched/core, to prevent conflicts with upcoming patches, and to refresh the tree
Linux 3.17-rc4
Diffstat (limited to 'include/linux/nsproxy.h')
-rw-r--r-- | include/linux/nsproxy.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/include/linux/nsproxy.h b/include/linux/nsproxy.h index b4ec59d159ac..35fa08fd7739 100644 --- a/include/linux/nsproxy.h +++ b/include/linux/nsproxy.h @@ -40,32 +40,28 @@ extern struct nsproxy init_nsproxy; * the namespaces access rules are: * * 1. only current task is allowed to change tsk->nsproxy pointer or - * any pointer on the nsproxy itself + * any pointer on the nsproxy itself. Current must hold the task_lock + * when changing tsk->nsproxy. * * 2. when accessing (i.e. reading) current task's namespaces - no * precautions should be taken - just dereference the pointers * * 3. the access to other task namespaces is performed like this - * rcu_read_lock(); - * nsproxy = task_nsproxy(tsk); + * task_lock(task); + * nsproxy = task->nsproxy; * if (nsproxy != NULL) { * / * * * work with the namespaces here * * e.g. get the reference on one of them * * / * } / * - * * NULL task_nsproxy() means that this task is + * * NULL task->nsproxy means that this task is * * almost dead (zombie) * * / - * rcu_read_unlock(); + * task_unlock(task); * */ -static inline struct nsproxy *task_nsproxy(struct task_struct *tsk) -{ - return rcu_dereference(tsk->nsproxy); -} - int copy_namespaces(unsigned long flags, struct task_struct *tsk); void exit_task_namespaces(struct task_struct *tsk); void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new); |