linux/fs/overlayfs
Amir Goldstein 5b02bfc1e7 ovl: do not encode lower fh with upper sb_writers held
When lower fs is a nested overlayfs, calling encode_fh() on a lower
directory dentry may trigger copy up and take sb_writers on the upper fs
of the lower nested overlayfs.

The lower nested overlayfs may have the same upper fs as this overlayfs,
so nested sb_writers lock is illegal.

Move all the callers that encode lower fh to before ovl_want_write().

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
2023-10-31 00:12:57 +02:00
..
copy_up.c ovl: do not encode lower fh with upper sb_writers held 2023-10-31 00:12:57 +02:00
dir.c ovl: reorder ovl_want_write() after ovl_inode_lock() 2023-10-31 00:12:57 +02:00
export.c ovl: reorder ovl_want_write() after ovl_inode_lock() 2023-10-31 00:12:57 +02:00
file.c ovl: add helper ovl_file_modified() 2023-10-31 00:12:55 +02:00
inode.c ovl: reorder ovl_want_write() after ovl_inode_lock() 2023-10-31 00:12:57 +02:00
Kconfig ovl: Kconfig: introduce CONFIG_OVERLAY_FS_DEBUG 2023-08-12 19:02:53 +03:00
Makefile ovl: modify layer parameter parsing 2023-06-20 14:10:40 +03:00
namei.c ovl: do not encode lower fh with upper sb_writers held 2023-10-31 00:12:57 +02:00
overlayfs.h ovl: do not encode lower fh with upper sb_writers held 2023-10-31 00:12:57 +02:00
ovl_entry.h ovl: make use of ->layers safe in rcu pathwalk 2023-10-02 17:45:02 +03:00
params.c ovl: temporarily disable appending lowedirs 2023-10-14 22:42:45 +03:00
params.h ovl: move all parameter handling into params.{c,h} 2023-07-03 16:08:17 +03:00
readdir.c vfs: get rid of old '->iterate' directory operation 2023-08-06 15:08:35 +02:00
super.c ovl: do not encode lower fh with upper sb_writers held 2023-10-31 00:12:57 +02:00
util.c ovl: do not encode lower fh with upper sb_writers held 2023-10-31 00:12:57 +02:00