diff --git a/kernel/cgroup.c b/kernel/cgroup.c index f047c73189f36..684d02f343b4c 100644 --- a/kernel/cgroup.c +++ b/kernel/cgroup.c @@ -6355,6 +6355,8 @@ void cgroup_sk_clone(struct sock_cgroup_data *skcd) { /* Socket clone path */ if (skcd->val) { + if (skcd->no_refcnt) + return; /* * We might be cloning a socket which is left in an empty * cgroup and the cgroup might have already been rmdir'd.