Skip to contentSkip to conversation

open_by_handle_at on disconnected dentry

DISCUSSION Dominique Martinet 1 participant 1 message Oct 4, 2016 VFS

lore
Share & tools
lore
#0 lore raw

Hi,

I've been playing with open_by_handle_at and noticed that I can get /proc/self/fd/X to contain just '/' by opening a handle in a directory that's not in cache (either through /proc/sys/vm/drop_cache or reboot)

Looking a bit further it looks like the path.dentry is disconnected (DCACHE_DISCONNECTED flag, and points to itself/d_name is /).

I see exportfs_decode_fh can call reconnect_path in this case for directories, or non-directly-acceptable files - maybe open_by_handle_at should make sure we're always connected, or have an open flag for it?

I'm not sure what other implications there are aside of the odd filename for its own /proc/self/fd and fanotify.

Thanks,

Signature · 1 line
Dominique Martinet