[PATCH v4 1/2] cgroup: fix cgroup_path() vs rename() race

2013-02-27 Thread Li Zefan
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

[PATCH v4 1/2] cgroup: fix cgroup_path() vs rename() race

2013-02-27 Thread Li Zefan
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,