Li Zefan
65dff759d2
cgroup: fix cgroup_path() vs rename() race
...
rename() will change dentry->d_name. The result of this race can
be worse than seeing partially rewritten name, but we might access
a stale pointer because rename() will re-allocate memory to hold
a longer name.
As accessing dentry->name must be protected by dentry->d_lock or
parent inode's i_mutex, while on the other hand cgroup-path() can
be called with some irq-safe spinlocks held, we can't generate
cgroup path using dentry->d_name.
Alternatively we make a copy of dentry->d_name and save it in
cgrp->name when a cgroup is created, and update cgrp->name at
rename().
v5: use flexible array instead of zero-size array.
v4: - allocate root_cgroup_name and all root_cgroup->name points to it.
- add cgroup_name() wrapper.
v3: use kfree_rcu() instead of synchronize_rcu() in user-visible path.
v2: make cgrp->name RCU safe.
Signed-off-by: Li Zefan <lizefan@huawei.com >
Signed-off-by: Tejun Heo <tj@kernel.org >
2013-03-04 09:50:08 -08:00
..
2013-02-26 09:24:48 -08:00
2013-03-02 16:33:54 -08:00
2013-02-26 15:03:06 -08:00
2013-02-21 15:27:22 -08:00
2013-03-01 13:39:00 -08:00
2013-02-20 11:00:43 -08:00
2013-03-03 12:06:09 -08:00
2013-02-28 18:02:55 -08:00
2013-02-27 19:10:09 -08:00
2013-02-26 11:41:08 -08:00
2013-02-24 14:37:22 -05:00
2013-02-22 09:22:19 +02:00
2013-03-02 16:33:54 -08:00
2013-02-22 09:20:11 -08:00
2013-02-21 12:11:44 -08:00
2013-03-02 16:46:07 -08:00
2013-02-21 15:27:22 -08:00
2013-03-02 09:34:39 -08:00
2013-02-21 17:22:19 -08:00
2013-03-01 12:47:16 +01:00
2013-02-26 02:46:13 -05:00
2013-02-23 17:50:12 -08:00
2013-02-20 09:37:28 -05:00
2013-02-21 17:22:16 -08:00
2013-03-04 09:50:08 -08:00
2013-02-23 17:50:10 -08:00
2013-02-25 09:24:55 -05:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:15 -08:00
2013-02-21 17:22:16 -08:00
2013-02-25 16:46:44 -08:00
2013-02-26 02:46:09 -05:00
2013-02-27 19:10:11 -08:00
2013-03-01 22:45:49 +00:00
2013-02-21 12:05:51 -08:00
2013-03-01 22:45:49 +00:00
2013-02-27 15:13:36 +05:30
2013-02-27 22:37:34 +05:30
2013-02-28 09:53:21 +05:30
2013-02-21 14:16:27 -03:00
2013-02-21 09:38:18 -08:00
2013-02-28 12:52:24 -08:00
2013-02-26 02:46:08 -05:00
2013-02-27 19:10:23 -08:00
2013-02-23 17:50:12 -08:00
2013-02-27 19:10:11 -08:00
2013-03-01 23:51:07 -05:00
2013-03-01 19:48:30 -05:00
2013-02-22 23:31:31 -05:00
2013-02-26 03:10:52 +11:00
2013-02-19 18:19:48 -08:00
2013-02-27 19:10:24 -08:00
2013-02-22 08:20:05 +01:00
2013-02-21 10:45:01 +01:00
2013-02-23 17:50:16 -08:00
2013-02-23 17:50:17 -08:00
2013-02-26 20:16:07 -08:00
2013-02-27 19:10:21 -08:00
2013-02-27 19:10:24 -08:00
2013-02-23 21:00:06 -05:00
2013-02-27 19:10:21 -08:00
2013-02-23 17:50:19 -08:00
2013-02-24 13:07:18 -08:00
2013-02-27 19:10:24 -08:00
2013-02-22 19:25:09 -08:00
2013-02-20 19:36:01 +01:00
2013-03-02 09:34:39 -08:00
2013-02-23 17:50:20 -08:00
2013-02-23 17:50:13 -08:00
2013-02-23 17:50:19 -08:00
2013-02-23 17:50:17 -08:00
2013-03-03 12:06:09 -08:00
2013-02-23 17:50:11 -08:00
2013-02-23 17:50:20 -08:00
2013-03-02 16:46:07 -08:00
2013-02-23 00:30:08 +01:00
2013-02-23 17:50:17 -08:00
2013-02-23 17:50:15 -08:00
2013-02-21 17:22:19 -08:00
2013-03-01 23:51:07 -05:00
2013-02-28 20:42:33 -08:00
2013-02-25 21:18:18 -08:00
2013-02-27 19:10:24 -08:00
2013-02-23 17:50:16 -08:00
2013-02-23 17:50:16 -08:00
2013-02-21 12:05:51 -08:00
2013-02-21 17:38:49 -08:00
2013-02-21 13:41:04 -08:00
2013-02-26 09:34:29 -08:00
2013-02-27 19:10:24 -08:00
2013-02-23 17:50:17 -08:00
2013-02-21 12:05:51 -08:00
2013-02-27 19:10:10 -08:00
2013-02-27 19:10:11 -08:00
2013-02-21 17:22:20 -08:00
2013-03-01 12:40:36 +01:00
2013-02-23 17:50:22 -08:00
2013-02-21 14:58:40 -08:00
2013-02-23 17:50:15 -08:00
2013-02-23 17:50:16 -08:00
2013-03-01 12:48:36 +01:00