Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-23 Thread Ritesh Harjani
On 10/23/19 1:41 AM, Al Viro wrote: On Tue, Oct 22, 2019 at 03:37:36PM +0100, Al Viro wrote: On Tue, Oct 22, 2019 at 07:08:54PM +0530, Ritesh Harjani wrote: I think we have still not taken this patch. Al? or, for that matter, any callers of filename_lookup() assuming that the lack of ENOE

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-22 Thread Al Viro
On Tue, Oct 22, 2019 at 03:37:36PM +0100, Al Viro wrote: > On Tue, Oct 22, 2019 at 07:08:54PM +0530, Ritesh Harjani wrote: > > I think we have still not taken this patch. Al? > You've picked the easiest one to hit, but on e.g. KVM setups you can have the > host thread representing the CPU where __

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-22 Thread Al Viro
On Tue, Oct 22, 2019 at 03:37:36PM +0100, Al Viro wrote: > I'm somewhat tempted to make __d_set_inode_and_type() do smp_store_release() > for setting ->d_flags and __d_entry_type() - smp_load_acquire(); that would > be pretty much free for x86 (as well as sparc, s390 and itanic) and reasonably > c

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-22 Thread Al Viro
On Tue, Oct 22, 2019 at 07:08:54PM +0530, Ritesh Harjani wrote: > I think we have still not taken this patch. Al? I'm still not sure it's a good way to deal with the whole mess, TBH ;-/ Consider e.g. walk_component(), with its if (unlikely(d_is_negative(path.dentry))) {

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-22 Thread Ritesh Harjani
I think we have still not taken this patch. Al? On 10/15/19 9:37 AM, Ritesh Harjani wrote: ping!! On 9/27/19 10:12 AM, Ritesh Harjani wrote: d_is_negative can race with d_instantiate_new() -> __d_set_inode_and_type(). For e.g. in use cases where Thread-1 is creating symlink (doing d_instantia

Re: [PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-10-14 Thread Ritesh Harjani
ping!! On 9/27/19 10:12 AM, Ritesh Harjani wrote: d_is_negative can race with d_instantiate_new() -> __d_set_inode_and_type(). For e.g. in use cases where Thread-1 is creating symlink (doing d_instantiate_new()) & Thread-2 is doing cat of that symlink while doing lookup_fast (via REF-walk- one s

[PATCH RESEND 1/1] vfs: Really check for inode ptr in lookup_fast

2019-09-26 Thread Ritesh Harjani
d_is_negative can race with d_instantiate_new() -> __d_set_inode_and_type(). For e.g. in use cases where Thread-1 is creating symlink (doing d_instantiate_new()) & Thread-2 is doing cat of that symlink while doing lookup_fast (via REF-walk- one such case is, when ->permission returns -ECHILD). Dur