From: Sukadev Bhattiprolu When setting capabilities, cap_set_all() must skip all threads of the cgroup_init process - not just the main thread. Signed-off-by: Sukadev Bhattiprolu Cc: Serge E. Hallyn Cc: Pavel Emelianov Cc: Eric W. Biederman Cc: Cedric Le Goater Cc: Herbert Poetzel Cc: Kirill Korotaev Signed-off-by: Andrew Morton --- kernel/capability.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN kernel/capability.c~pid-namespaces-define-is_global_init-and-is_container_init-fix-capabilityc-to-work-with-threaded-init kernel/capability.c --- a/kernel/capability.c~pid-namespaces-define-is_global_init-and-is_container_init-fix-capabilityc-to-work-with-threaded-init +++ a/kernel/capability.c @@ -130,7 +130,7 @@ static inline int cap_set_all(kernel_cap int found = 0; do_each_thread(g, target) { - if (target == current || is_container_init(target)) + if (target == current || is_container_init(target->group_leader)) continue; found = 1; if (security_capset_check(target, effective, inheritable, _