diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-19 08:13:36 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-19 08:13:36 -0800 |
commit | febfcef60d4f9457785b45aab548bc7ee5ea158f (patch) | |
tree | 70fab0e8ec07aec4142f1dc228f307e6b1d79de0 /kernel/kallsyms.c | |
parent | 4e139afc22cb98d0d032ffce0285bfcc73ca5217 (diff) | |
download | linux-febfcef60d4f9457785b45aab548bc7ee5ea158f.tar.gz linux-febfcef60d4f9457785b45aab548bc7ee5ea158f.tar.bz2 linux-febfcef60d4f9457785b45aab548bc7ee5ea158f.zip |
cgroup: cgroup->dentry isn't a RCU pointer
cgroup->dentry is marked and used as a RCU pointer; however, it isn't
one - the final dentry put doesn't go through call_rcu(). cgroup and
dentry share the same RCU freeing rule via synchronize_rcu() in
cgroup_diput() (kfree_rcu() used on cgrp is unnecessary). If cgrp is
accessible under RCU read lock, so is its dentry and dereferencing
cgrp->dentry doesn't need any further RCU protection or annotation.
While not being accurate, before the previous patch, the RCU accessors
served a purpose as memory barriers - cgroup->dentry used to be
assigned after the cgroup was made visible to cgroup_path(), so the
assignment and dereferencing in cgroup_path() needed the memory
barrier pair. Now that list_add_tail_rcu() happens after
cgroup->dentry is assigned, this no longer is necessary.
Remove the now unnecessary and misleading RCU annotations from
cgroup->dentry. To make up for the removal of rcu_dereference_check()
in cgroup_path(), add an explicit rcu_lockdep_assert(), which asserts
the dereference rule of @cgrp, not cgrp->dentry.
Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'kernel/kallsyms.c')
0 files changed, 0 insertions, 0 deletions