cgroup: fail if monitored file and event_control are in different cgroup
If we pass fd of memory.usage_in_bytes of cgroup A to cgroup.event_control of cgroup B, then we won't get memory usage notification from A but B! What's worse, if A and B are in different mount hierarchy, we'll end up accessing NULL pointer! Disallow this kind of invalid usage. Signed-off-by: NLi Zefan <lizefan@huawei.com> Acked-by: NKirill A. Shutemov <kirill@shutemov.name> Signed-off-by: NTejun Heo <tj@kernel.org>
Showing
想要评论请 注册 或 登录