From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Theodore Ts'o" Subject: Re: [PATCH v2 3/5] fs, fscrypt: clear DCACHE_ENCRYPTED_NAME when unaliasing directory Date: Wed, 17 Apr 2019 10:06:10 -0400 Message-ID: <20190417140610.GC4686@mit.edu> References: <20190320183913.12686-1-ebiggers@kernel.org> <20190320183913.12686-4-ebiggers@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20190320183913.12686-4-ebiggers@kernel.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+gldm-linux-mtd-36=gmane.org@lists.infradead.org To: Eric Biggers Cc: Gao Xiang , linux-unionfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fscrypt@vger.kernel.org, linux-mtd@lists.infradead.org, Sarthak Kukreti , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org List-Id: linux-f2fs-devel.lists.sourceforge.net On Wed, Mar 20, 2019 at 11:39:11AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Make __d_move() clear DCACHE_ENCRYPTED_NAME on the source dentry. This > is needed for when d_splice_alias() moves a directory's encrypted alias > to its decrypted alias as a result of the encryption key being added. > > Otherwise, the decrypted alias will incorrectly be invalidated on the > next lookup, causing problems such as unmounting a mount the user just > mount()ed there. > > Note that we don't have to support arbitrary moves of this flag because > fscrypt doesn't allow dentries with DCACHE_ENCRYPTED_NAME to be the > source or target of a rename(). > > Fixes: 28b4c263961c ("ext4 crypto: revalidate dentry after adding or removing the key") > Reported-by: Sarthak Kukreti > Signed-off-by: Eric Biggers Looks good, applied. - Ted ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/