Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:46642 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbfACNlG (ORCPT ); Thu, 3 Jan 2019 08:41:06 -0500 From: David Howells In-Reply-To: <20190102233118.GA19202@gmail.com> References: <20190102233118.GA19202@gmail.com> <20181229000400.26333-1-avagin@gmail.com> <20181228235900.21468-1-avagin@gmail.com> <21902.1546467980@warthog.procyon.org.uk> <20190102230655.GA8616@gmail.com> To: Andrei Vagin Cc: dhowells@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, cgroups@vger.kernel.org, Li Zefan Subject: Re: [PATCH vfs/for-next v2] cgroup: fix top cgroup refcnt leak MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <10059.1546522863.1@warthog.procyon.org.uk> Date: Thu, 03 Jan 2019 13:41:03 +0000 Message-ID: <10060.1546522863@warthog.procyon.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: I'm seeing something a bit weird, but I'm not sure why. If I expand Andrei's test script to: set -m d=$(mktemp -d /tmp/cg.XXXXXX) mkdir $d/a1 mount -t cgroup -o none,name=xxxxy xxx $d/a1 mkdir $d/a2 mount -t cgroup -o none,name=xxxxy xxx $d/a2 mkdir -p $d/a1/test umount $d/a1 umount $d/a2 d=$(mktemp -d /tmp/cg.XXXXXX) mkdir $d/a1 mount -t cgroup -o none,name=xxxxy xxx $d/a1 mkdir $d/a2 mount -t cgroup -o none,name=xxxxy xxx $d/a2 rmdir $d/a1/test umount $d/a1 umount $d/a2 then a cgroup gets leaked at the end. Just retaining the final: for i in `seq 2`; do umount $d/a$i done in place of the two final expanded umount commands fixes the issue. The mounts are getting released, but not the cgroups as far as I can tell. David