[GIT PULL] overlayfs fixes for 6.6-rc5

From: Amir Goldstein
Date: Thu Oct 05 2023 - 10:05:58 EST


Hi Linus,

Please pull overlayfs fixes for 6.6-rc5.

This branch has been sitting in linux-next for a couple of days and
it has gone through the usual overlayfs test routines.

The branch merges cleanly with master branch of the moment.

Thanks,
Amir.

----------------------------------------------------------------
The following changes since commit 8a749fd1a8720d4619c91c8b6e7528c0a355c0aa:

Linux 6.6-rc4 (2023-10-01 14:15:13 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs.git ovl-fixes-6.6-rc5

for you to fetch changes up to c7242a45cb8cad5b6cd840fd4661315b45b1e841:

ovl: fix NULL pointer defer when encoding non-decodable lower fid (2023-10-03 09:24:11 +0300)

----------------------------------------------------------------
overlayfs fixes for 6.6-rc5:

- Fix for file reference leak regression from v6.6-rc2

- Fix for NULL pointer deref regression from v6.6-rc1

- Fixes for RCU-walk race regressions from v6.5:

Two of the fixes were taken from Al's RCU pathwalk race fixes series
with his concent [1].

Note that unlike most of Al's series, these two patches are not about
racing with ->kill_sb() and they are also very recent regressions from
v6.5, so I think it's worth getting them into v6.5.y.

There is also a fix for an RCU pathwalk race with ->kill_sb(), which
may have been solved in vfs generic code as you suggested, but it also
rids overlayfs from a nasty hack, so I think it's worth anyway.

[1] https://lore.kernel.org/linux-fsdevel/20231003204749.GA800259@ZenIV/

----------------------------------------------------------------
Al Viro (2):
ovl: move freeing ovl_entry past rcu delay
ovl: fetch inode once in ovl_dentry_revalidate_common()

Amir Goldstein (3):
ovl: fix file reference leak when submitting aio
ovl: make use of ->layers safe in rcu pathwalk
ovl: fix NULL pointer defer when encoding non-decodable lower fid

fs/overlayfs/export.c | 2 +-
fs/overlayfs/file.c | 2 --
fs/overlayfs/ovl_entry.h | 10 +---------
fs/overlayfs/params.c | 17 +++++++++--------
fs/overlayfs/super.c | 27 +++++++++++++++++----------
5 files changed, 28 insertions(+), 30 deletions(-)