Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cgroups: fix race between userspace and kernelspace
Notify userspace about cgroup removing only after rmdir of cgroup directory to avoid race between userspace and kernelspace. eventfd are used to notify about two types of event: - control file-specific, like crossing memory threshold; - cgroup removing. To understand what really happen, userspace can check if the cgroup still exists. To avoid race beetween userspace and kernelspace we have to notify userspace about cgroup removing only after rmdir of cgroup directory. Signed-off-by: Kirill A. Shutemov <[email protected]> Reviewed-by: KAMEZAWA Hiroyuki <[email protected]> Cc: Paul Menage <[email protected]> Acked-by: Li Zefan <[email protected]> Cc: Balbir Singh <[email protected]> Cc: Pavel Emelyanov <[email protected]> Cc: Dan Malek <[email protected]> Cc: Daisuke Nishimura <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information