Tejun Heo 7dbdb199d3 cgroup: replace cftype->mode with CFTYPE_WORLD_WRITABLE
cftype->mode allows controllers to give arbitrary permissions to
interface knobs.  Except for "cgroup.event_control", the existing uses
are spurious.

* Some explicitly specify S_IRUGO | S_IWUSR even though that's the
  default.

* "cpuset.memory_pressure" specifies S_IRUGO while also setting a
  write callback which returns -EACCES.  All it needs to do is simply
  not setting a write callback.

"cgroup.event_control" uses cftype->mode to make the file
world-writable.  It's a misdesigned interface and we don't want
controllers to be tweaking interface file permissions in general.
This patch removes cftype->mode and all its spurious uses and
implements CFTYPE_WORLD_WRITABLE for "cgroup.event_control" which is
marked as compatibility-only.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
2015-09-18 17:54:23 -04:00
..
2015-09-10 13:29:01 -07:00
2012-01-03 22:54:56 -05:00
2015-06-24 17:49:45 -07:00
2015-09-10 13:29:01 -07:00
2011-07-26 16:49:47 -07:00
2015-09-11 16:42:39 -07:00
2015-04-15 16:35:18 -07:00
2015-09-11 16:42:39 -07:00
2015-09-08 14:35:59 -07:00
2015-09-08 15:35:28 -07:00
2015-09-10 13:29:01 -07:00
2015-02-11 17:06:02 -08:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-10 13:29:01 -07:00
2015-09-08 15:35:28 -07:00
2015-09-10 13:29:01 -07:00
2015-09-08 15:35:28 -07:00
2015-09-10 13:29:01 -07:00
2015-09-08 15:35:28 -07:00