[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87bkfo12vm.fsf@suse.de>
Date: Thu, 03 Aug 2023 12:56:13 -0400
From: Gabriel Krisman Bertazi <krisman@...e.de>
To: Eric Biggers <ebiggers@...nel.org>
Cc: viro@...iv.linux.org.uk, brauner@...nel.org, tytso@....edu,
jaegeuk@...nel.org, linux-fsdevel@...r.kernel.org,
linux-ext4@...r.kernel.org, linux-f2fs-devel@...ts.sourceforge.net,
Gabriel Krisman Bertazi <krisman@...labora.com>
Subject: Re: [PATCH v4 3/7] libfs: Validate negative dentries in
case-insensitive directories
Eric Biggers <ebiggers@...nel.org> writes:
> On Thu, Jul 27, 2023 at 01:28:39PM -0400, Gabriel Krisman Bertazi wrote:
>> dentry->d_name is only checked by the case-insensitive d_revalidate hook
>> in the LOOKUP_CREATE/LOOKUP_RENAME_TARGET case since, for these cases,
>> d_revalidate is always called with the parent inode read-locked, and
>> therefore the name cannot change from under us.
>
> "at least read-locked"? Or do you actually mean write-locked?
No. I mean read-locked, as in holding the read-part of the inode lock.
This is the case for lookup_slow, which is safe, despite the d_add_ci
case we discussed in the previous iteration. I'll reword to say "at
least read-locked and mention it is the case in lookup_slow".
>> +static inline int generic_ci_d_revalidate(struct dentry *dentry,
>> + const struct qstr *name,
>> + unsigned int flags)
>
> No need for inline here.
sorry, I missed the inline from your previuos review. Will fix it up
for this one.
>
> - Eric
--
Gabriel Krisman Bertazi
Powered by blists - more mailing lists