From mboxrd@z Thu Jan 1 00:00:00 1970 From: Al Viro Subject: Re: [PATCH] mnt: don't allow to detach the namespace root Date: Tue, 7 Oct 2014 14:24:36 +0100 Message-ID: <20141007132431.GF7996@ZenIV.linux.org.uk> References: <1412683212-28077-1-git-send-email-avagin@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Serge Hallyn To: Andrey Vagin Return-path: Received: from zeniv.linux.org.uk ([195.92.253.2]:45513 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753844AbaJGNYi (ORCPT ); Tue, 7 Oct 2014 09:24:38 -0400 Content-Disposition: inline In-Reply-To: <1412683212-28077-1-git-send-email-avagin@openvz.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue, Oct 07, 2014 at 04:00:12PM +0400, Andrey Vagin wrote: > This patch fixes a bug, which is triggered by following code: > while (1) { > if (umount2("/", MNT_DETACH) || > setns(fd, CLONE_NEWNS)) > return break; > } Excuse me, but that makes no sense whatsoever (not to mention that reproducer won't compile - return break; alone is enough to make sure of that). Could you post the real reproducer?