From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04A0630B521 for ; Mon, 2 Feb 2026 20:03:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770062599; cv=none; b=uUzrwz/FoVypuCv2hdTCU215Z8pCS21AF6a38u2csHAJZYAX9dV1OyxU7V4fPfHtSCarujSlxVOxII1/xeNdHGFxHoeHzHGsJ80/Be4nbjhqRrSr/uS5Cb/BCAW82iFnAenypfP6/1AheLLXuQby9ERuiAkeJGZSbDZyaC5I/YI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770062599; c=relaxed/simple; bh=bIlM/4QQa7ihj6Fxhl8KrmmDbU4/lwS9+INy3m5qDKA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oYwZOJiPE+/xJUHc4rM1SWGReb4dSVHxjMogptP+5ljB+JpcheF4YaLCySGmnk3WXCEA4l+iERcqwTUjPzCfJ/N+H9HL4u4lv9WlF61HaqtMmP6Xsw3WU3mhmEBXO9Rn4Jl/SdalXXfNDmrOcqruFCbrhUjZ+QReauWfJ0Lqsis= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=bfpcaieJ; arc=none smtp.client-ip=209.85.128.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bfpcaieJ" Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-4801c2fae63so37041685e9.2 for ; Mon, 02 Feb 2026 12:03:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770062596; x=1770667396; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Oeyy3A9F0h68gai95rKC/WKtYz02tqXoxrCeMHYnONw=; b=bfpcaieJRa67PWwcQjz5+s1PDDFlX5vaehv2dj5WTGocasY8LgUys6EQEzr3ksjpLj +rIfA4QlKwM/qcnYmJPZzmbx9J10YWK4/8wRx6PblTus7sCfdUJxL2IkyES/iji5afZR YaSRrvlkEU4st8OpqnzSQHa1ejVoBWqQB5PB0G4utMrJmsc8QtsLDMHoZHE1KSIl5zUf L0MpddMgnfOtf/bzFNMqRtwJG5SrbewlXOvRZekoorCfTmYdEkRVnIAuUSJf0VNMQvsV 86ire3FRP37u3RkwkcXo6gy7tCpBPhBOPyQUtakRJ+Yvb4CyfkMSFRCkHvL5FPS3s2c1 j2Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770062596; x=1770667396; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Oeyy3A9F0h68gai95rKC/WKtYz02tqXoxrCeMHYnONw=; b=bLvVDeZfKORlaoVJ+g7N8OG8rC6YXwsm2OwJD/7gIqQFXBbPMr6CNNEa7evmkr5opL EhrrVAZsHP1doYuDPLKDp20JaqVjSIxm70UmMog050ZeVy10ex9GPFzRXFo+Afj4dnBD qgauFsY5f8HufLPZBJzthxceRSc56zS3WNINNmc/4uT4kL9ichkRm2vTl35SuNbBaaA0 HlRgLoURRvAOfUeAqhN0FgIZcwr43Ez8JRsfWTvqn9YN2VjJa998i7MTskPX9lWXjIDi P9zQIrYpuhujUIkF8VPsQstiTzDud5WAaZy6/1ZPN3JLufrVEyvO3N5iXbzDIcXhTe/r 85JA== X-Forwarded-Encrypted: i=1; AJvYcCVPbBbkv55/O2v6PpawUi7NuudIBpGZcv0xEzrcm6ihwthrJCG4iry/GMh7OGUreJnKv8baDlgCTOUGbwQ=@vger.kernel.org X-Gm-Message-State: AOJu0YxRECYkzl+kXz8wmUea2yLtey5MLiZk0hZDyyF7uBkbiYLv3ziM vGGB0zmPn3TffrMtCl11OGojbnxvurloJ16637JUrEJAtc31U/4im2wj X-Gm-Gg: AZuq6aIvcNHbbEr+BOG1ryKbedlEtPjErlD5PHTql+Iccg7y8ecHiVI/DXqR5coshto 6Jan0LtfOA8u4lp/YQkQlezCY6K7Qka04snoQMx92Ta2duNU4D7jQukDzwfOqjDE2basSa8hYHb k+6bvet5wg1SiCLuV0ocQ0qGDtB+55ycmTZyFSdBUYFr/a/MyvQq/kAUcV8i7zMClVS0qrtRFiG BlCnEcz+tBzpyN3iIXjU6ID4oZJb/B+2k+whQPC3bT/Uc1RpJ6E3B4rbmR5+iOTDB2SQiTVPVfy aYK5B6N4kSWrxVg++YDFKw1RKkhBwYPW4W6qS1T0sfwpZVfIhee7bhNrhpMTpOtxvwdz0UO5leU gNiuFj3IsrtCG2gosj+7TWnhwwyWFTRNVh41ks9xaY/nVf5rP91fN5IoUZV6Q244u9hpcatU2J9 BBzFVgD4c= X-Received: by 2002:a05:600c:4507:b0:480:39ad:3b7c with SMTP id 5b1f17b1804b1-482db45e244mr170114895e9.16.1770062596185; Mon, 02 Feb 2026 12:03:16 -0800 (PST) Received: from localhost ([212.73.77.104]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-483051626c1sm9918025e9.13.2026.02.02.12.03.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Feb 2026 12:03:15 -0800 (PST) From: Askar Safin To: kas@kernel.org Cc: baolin.wang@linux.alibaba.com, brauner@kernel.org, hughd@google.com, jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, viro@zeniv.linux.org.uk Subject: Re: Orphan filesystems after mount namespace destruction and tmpfs "leak" Date: Mon, 2 Feb 2026 23:03:00 +0300 Message-ID: <20260202200300.2719301-1-safinaskar@gmail.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Kiryl Shutsemau : > Hi, I think I know how to fix the problem. The problem is in your container manager. It seems that the container manager doesn't unmount filesystems or unmounts them with MNT_DETACH (i. e. lazy). What you should do is to make your container manager actually iterate over all filesystems and unmount them without MNT_DETACH. Of course, this will not work in your scenario. "umount" call will fail. But at very least you will actually get failing syscall. I. e. you will get fail instead of silent leak. You may go further: if umount on tmpfs fails, then simply go and remove all files in that tmpfs. And then unmount it using MNT_DETACH. In fact, this will not remove all files. This process will remove all files it can remove. I. e. exactly what you need! I. e. it will remove whole 47 GiB of data and just keep 4k, which are actually busy. Feel free to ask me any questions. -- Askar Safin