[PATCH 0/4] netfs: Yet further miscellaneous fixes
David Howells
dhowells at redhat.com
Thu Apr 23 15:22:03 PDT 2026
Hi Christian,
Here are yet more miscellaneous fixes for netfslib, one found by Mark Brown
when integrating linux-next and the rest found by Sashiko.dev's AI review[1]:
(1) Fix a return statement that should have been removed from
netfs_read_sizes() and only happens on 32-bit SMP.
(2) Fix read and write result collection use barriering correctly to
access a request's subrequest lists without taking a lock.
This adds list_add_tail_release() and list_first_entry_acquire() to
appropriate incorporate barriering into some list functions.
(3) Fix afs_get_link() to take the vnode->validate_lock around
afs_read_single() to prevent a race with another caller of
afs_get_link() also trying to read the symlink content.
(4) Fix the RCU handling of symlinks in RCU pathwalk. The problems were
that afs_get_link() didn't use proper RCU pointer dereferencing and
that AFS symlinks can be updated remotely, potentially causing the
buffer memory to be changed.
These are applied on top of your vfs.fixes branch. Patch 1 should fix the
problem in linux-next integration.
The patches can also be found here:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes
Thanks,
David
[1] https://sashiko.dev/#/patchset/20260326104544.509518-1-dhowells%40redhat.com
base-commit: 986563b3799fee66965811df3f46f5bb76736084
David Howells (4):
netfs: Fix wrong return from netfs_read_sizes() on 32-bit SMP arches
netfs: Fix missing barriers when accessing stream->subrequests
locklessly
afs: Fix afs_get_link() to take validate_lock around afs_read_single()
afs: Fix RCU handling of symlinks in RCU pathwalk
fs/afs/Makefile | 1 +
fs/afs/dir.c | 33 ++++--
fs/afs/fsclient.c | 4 +-
fs/afs/inode.c | 96 +---------------
fs/afs/internal.h | 35 ++++--
fs/afs/symlink.c | 242 +++++++++++++++++++++++++++++++++++++++
fs/afs/yfsclient.c | 4 +-
fs/netfs/buffered_read.c | 9 +-
fs/netfs/direct_read.c | 15 +--
fs/netfs/internal.h | 3 +
fs/netfs/read_collect.c | 4 +-
fs/netfs/read_single.c | 12 +-
fs/netfs/write_collect.c | 4 +-
fs/netfs/write_issue.c | 3 +-
include/linux/list.h | 37 ++++++
include/linux/netfs.h | 1 -
16 files changed, 358 insertions(+), 145 deletions(-)
create mode 100644 fs/afs/symlink.c
More information about the linux-afs
mailing list