From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 80F8CC10F25 for ; Fri, 6 Mar 2020 20:45:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 51A25206CC for ; Fri, 6 Mar 2020 20:45:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726259AbgCFUpc (ORCPT ); Fri, 6 Mar 2020 15:45:32 -0500 Received: from zeniv.linux.org.uk ([195.92.253.2]:39080 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725922AbgCFUpc (ORCPT ); Fri, 6 Mar 2020 15:45:32 -0500 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jAJqV-006UGt-B7; Fri, 06 Mar 2020 20:45:23 +0000 Date: Fri, 6 Mar 2020 20:45:23 +0000 From: Al Viro To: Miklos Szeredi Cc: Ian Kent , David Howells , Christian Brauner , James Bottomley , Steven Whitehouse , Miklos Szeredi , Christian Brauner , Jann Horn , "Darrick J. Wong" , Linux API , linux-fsdevel , lkml , Greg Kroah-Hartman Subject: Re: [PATCH 00/17] VFS: Filesystem information and notifications [ver #17] Message-ID: <20200306204523.GD23230@ZenIV.linux.org.uk> References: <107666.1582907766@warthog.procyon.org.uk> <0403cda7345e34c800eec8e2870a1917a8c07e5c.camel@themaw.net> <20200306162549.GA28467@miu.piliscsaba.redhat.com> <20200306194322.GY23230@ZenIV.linux.org.uk> <20200306195823.GZ23230@ZenIV.linux.org.uk> <20200306200522.GA23230@ZenIV.linux.org.uk> <20200306203705.GB23230@ZenIV.linux.org.uk> <20200306203844.GC23230@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200306203844.GC23230@ZenIV.linux.org.uk> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Mar 06, 2020 at 08:38:44PM +0000, Al Viro wrote: > On Fri, Mar 06, 2020 at 08:37:05PM +0000, Al Viro wrote: > > > You are misreading mntput_no_expire(), BTW - your get_mount() can > > bloody well race with umount(2), hitting the moment when we are done > > figuring out whether it's busy but hadn't cleaned ->mnt_ns (let alone > > set MNT_DOOMED) yet. If somebody calls umount(2) on a filesystem that > > is not mounted anywhere else, they are not supposed to see the sucker > > return 0 until the filesystem is shut down. You break that. > > While we are at it, d_alloc_parallel() requires i_rwsem on parent held > at least shared. Egads... Let me see if I got it right - you are providing procfs symlinks to objects on the internal mount of that thing. And those objects happen to be directories, so one can get to their parent that way. Or am I misreading that thing?