Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp999730ybi; Fri, 12 Jul 2019 08:03:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCvy7LswhSqP6wmPc1vibAZmQJUCJDPuY9ONOd1dKzXio5eiybwgvJEzXjiKWt5eN3zfDh X-Received: by 2002:a17:902:8b88:: with SMTP id ay8mr11614545plb.139.1562943802820; Fri, 12 Jul 2019 08:03:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562943802; cv=none; d=google.com; s=arc-20160816; b=K33eJdwSCuE6nClW2OxIf3yCnAMesKHYKfQGLbtCt/fvzidQ4NhY3AfooqC3vJDS7c BHvv9Yr7YV/zPAs6xegq2/64EwSJeJ4ZwslkTjphjJKJPAkPBDGXq+uDToohO6rYt8Fv FTNn99FxbUS7QrTmzuORDhZUYNRhmoqA/shf1KcN0A86qDHdC9HUadqa94PqG/CT6HEP b9vmRuFnyWTKfgs/NHBxBc2fu+2XtFmFM5Ksdygcv7v44Qls6FRHZSNt6XauX0vb6+/d IdWmQWL37Ij7aLSeaIl68qRCH8ILRkSxxVY5Toky/qQYu6qHBffa0z2asED5pS9nRjKZ Cvsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7Pzq43L31I8TNABrQSM0A2PiISQPSegFlifI3Nqe+/M=; b=juQRGcIzUM3i59TiPyxgOeUb+FeReKDJhdpZIQG2+R/8MSeKfLEsZnlLYofRSDLeTJ CeDWR0fRZjh5XnqjdWiDylAkp0mGvnMCr3zNYNftLzJa1pqN9qqLZ7U3BgcZELJyF2Bf 5R0d/U7MdH+sukI9VCo8i99trvEARC7GkopBjY9q4++yIhdroSUCvwKfeTuPmcyRCVaw olqEyeziK304STYHuFVGmoCKmnc4nIqGzZ/f+wQ72fZxk+ySj9DOJNVB/zlPd3fBlDO2 mIpMQx4aEJQdeWzcmWAfUxIpMNmC8jrdWBlS8BHo71fzMHNPOlxUvNJZNVND5Vepy4Ss hoDg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g98si8382213pje.92.2019.07.12.08.03.06; Fri, 12 Jul 2019 08:03:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727306AbfGLPAy (ORCPT + 99 others); Fri, 12 Jul 2019 11:00:54 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:39588 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727035AbfGLPAx (ORCPT ); Fri, 12 Jul 2019 11:00:53 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92 #3 (Red Hat Linux)) id 1hlx2B-000201-9w; Fri, 12 Jul 2019 15:00:27 +0000 Date: Fri, 12 Jul 2019 16:00:27 +0100 From: Al Viro To: Aleksa Sarai Cc: Jeff Layton , "J. Bruce Fields" , Arnd Bergmann , David Howells , Shuah Khan , Shuah Khan , Christian Brauner , David Drysdale , Andy Lutomirski , Linus Torvalds , Eric Biederman , Andrew Morton , Alexei Starovoitov , Kees Cook , Jann Horn , Tycho Andersen , Chanho Min , Oleg Nesterov , Aleksa Sarai , containers@lists.linux-foundation.org, linux-alpha@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, linux-xtensa@linux-xtensa.org, sparclinux@vger.kernel.org Subject: Re: [PATCH v9 05/10] namei: O_BENEATH-style path resolution flags Message-ID: <20190712150026.GO17978@ZenIV.linux.org.uk> References: <20190706145737.5299-1-cyphar@cyphar.com> <20190706145737.5299-6-cyphar@cyphar.com> <20190712043341.GI17978@ZenIV.linux.org.uk> <20190712105745.nruaftgeat6irhzr@yavin> <20190712123924.GK17978@ZenIV.linux.org.uk> <20190712125552.GL17978@ZenIV.linux.org.uk> <20190712132553.GN17978@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190712132553.GN17978@ZenIV.linux.org.uk> User-Agent: Mutt/1.11.3 (2019-02-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 12, 2019 at 02:25:53PM +0100, Al Viro wrote: > if (flags & LOOKUP_BENEATH) { > nd->root = nd->path; > if (!(flags & LOOKUP_RCU)) > path_get(&nd->root); > else > nd->root_seq = nd->seq; BTW, this assignment is needed for LOOKUP_RCU case. Without it you are pretty much guaranteed that lazy pathwalk will fail, when it comes to complete_walk(). Speaking of which, what would happen if LOOKUP_ROOT/LOOKUP_BENEATH combination would someday get passed?