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 Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BAD9EC77B7E for ; Thu, 1 Jun 2023 15:53:21 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1q4kc2-0007wO-KT; Thu, 01 Jun 2023 15:53:19 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1q4kc2-0007wI-9n for linux-f2fs-devel@lists.sourceforge.net; Thu, 01 Jun 2023 15:53:18 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:Content-Type:MIME-Version :In-Reply-To:References:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=qpxmZLZ5cP4CMuns31xPxEBaXDHT8A2MbAGGojZNp4s=; b=bgyGgeFEdHF84GASyri+HFv4EI jo1Az33bhwC+wmy/NhzSaUVXQFaRmSD0MkkCmztomC9ADL8fgLtFprUT+4gEWfzoIQggSr+2btexW ZVF5xOUgW7t4PoMm2xBTeQ+6BDPn+ipB7mnI47VymMqqsy2YhZ29cBJ3RGSgH9PmD18w=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To: References:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=qpxmZLZ5cP4CMuns31xPxEBaXDHT8A2MbAGGojZNp4s=; b=OwODA2CFqWvxJUX8Oqf4Dz+KeB 2+prlrT9jNaeRGomRyBD2e2XJ0HZej/2K2a4ONgWQsi9X8PO2yZ6egvn2zNpwPK8W220yUmTysi8T +i2eFLJyG458H5zkDVAjC69vIUbhjdhl57tNFjZlEoLVd7tQWj+X0By4pATvghiJM95c=; Received: from eu-smtp-delivery-151.mimecast.com ([185.58.86.151]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1q4kbz-0001ND-UR for linux-f2fs-devel@lists.sourceforge.net; Thu, 01 Jun 2023 15:53:18 +0000 Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-263-AHup6Xd1OrWFzyw2F6GqSw-1; Thu, 01 Jun 2023 16:37:36 +0100 X-MC-Unique: AHup6Xd1OrWFzyw2F6GqSw-1 Received: from AcuMS.Aculab.com (10.202.163.6) by AcuMS.aculab.com (10.202.163.6) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 1 Jun 2023 16:37:32 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Thu, 1 Jun 2023 16:37:32 +0100 From: David Laight To: 'Jan Kara' , Christian Brauner Thread-Topic: [PATCH v2 4/6] fs: Establish locking order for unrelated directories Thread-Index: AQHZlJ1FZufsO2GDRE+EhxV9kbhF9692EqgQ Date: Thu, 1 Jun 2023 15:37:32 +0000 Message-ID: References: <20230601104525.27897-1-jack@suse.cz> <20230601105830.13168-4-jack@suse.cz> <20230601-gebracht-gesehen-c779a56b3bf3@brauner> <20230601152449.h4ur5zrfqjqygujd@quack3> In-Reply-To: <20230601152449.h4ur5zrfqjqygujd@quack3> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US X-Headers-End: 1q4kbz-0001ND-UR Subject: Re: [f2fs-dev] [PATCH v2 4/6] fs: Establish locking order for unrelated directories X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ted Tso , Miklos Szeredi , "Darrick J. Wong" , "stable@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , "linux-xfs@vger.kernel.org" , Al Viro , "linux-fsdevel@vger.kernel.org" , Jaegeuk Kim , "linux-ext4@vger.kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net ... > > > + * Lock any non-NULL argument. The caller must make sure that if he is passing > > > + * in two directories, one is not ancestor of the other Not directly relevant to this change but is the 'not an ancestor' check actually robust? I found a condition in which the kernel 'pwd' code (which follows the inode chain) failed to stop at the base of a chroot. I suspect that the ancestor check would fail the same way. IIRC the problematic code used unshare() to 'escape' from a network natespace. If it was inside a chroot (that wasn't on a mount point) there ware two copies of the 'chroot /' inode and the match failed. I might be able to find the test case. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales) _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel