2020-04-14 13:15:47

by David Howells

[permalink] [raw]
Subject: [GIT PULL] afs: Fixes [try #2]

Hi Linus,

Here are some fixes for the afs filesystem:

(1) Fix the decoding of fetched file status records so that the xdr
pointer is advanced under all circumstances.

(2) Fix the decoding of a fetched file status record that indicates an
inline abort (ie. an error) so that it sets the flag saying the
decoder stored the abort code.

(3) Fix the decoding of the result of the rename operation so that it
doesn't skip the decoding of the second fetched file status (ie. that
of the dest dir) in the case that the source and dest dirs were the
same as this causes the xdr pointer not to be advanced, leading to
incorrect decoding of subsequent parts of the reply.

(4) Fix the dump of a bad YFSFetchStatus record to dump the full length.

(5) Fix a race between local editing of directory contents and accessing
the dir for reading or d_revalidate by using the same lock in both.

(6) Fix afs_d_revalidate() to not accidentally reverse the version on a
dentry when it's meant to be bringing it forward.

David
---
The following changes since commit 8f3d9f354286745c751374f5f1fcafee6b3f3136:

Linux 5.7-rc1 (2020-04-12 12:35:55 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git tags/afs-fixes-20200413

for you to fetch changes up to 40fc81027f892284ce31f8b6de1e497f5b47e71f:

afs: Fix afs_d_validate() to set the right directory version (2020-04-13 15:09:01 +0100)

----------------------------------------------------------------
AFS fixes

----------------------------------------------------------------
David Howells (6):
afs: Fix missing XDR advance in xdr_decode_{AFS,YFS}FSFetchStatus()
afs: Fix decoding of inline abort codes from version 1 status records
afs: Fix rename operation status delivery
afs: Fix length of dump of bad YFSFetchStatus record
afs: Fix race between post-modification dir edit and readdir/d_revalidate
afs: Fix afs_d_validate() to set the right directory version

fs/afs/dir.c | 108 +++++++++++++++++++++++++++++++++--------------------
fs/afs/dir_silly.c | 22 +++++++----
fs/afs/fsclient.c | 27 ++++++++------
fs/afs/yfsclient.c | 26 +++++++------
4 files changed, 112 insertions(+), 71 deletions(-)