2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/fs/afs
David Howells 823869e1e6 afs: Fix afs_atcell_get_link() to handle RCU pathwalk
The ->get_link() method may be entered under RCU pathwalk conditions (in
which case, the dentry pointer is NULL).  This is not taken account of by
afs_atcell_get_link() and lockdep will complain when it tries to lock an
rwsem.

Fix this by marking net->ws_cell as __rcu and using RCU access macros on it
and by making afs_atcell_get_link() just return a pointer to the name in
RCU pathwalk without taking net->cells_lock or a ref on the cell as RCU
will protect the name storage (the cell is already freed via call_rcu()).

Fixes: 30bca65bbb ("afs: Make /afs/@cell and /afs/.@cell symlinks")
Reported-by: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
cc: linux-fsdevel@vger.kernel.org
Link: https://lore.kernel.org/r/20250310094206.801057-2-dhowells@redhat.com/ # v4
2025-03-10 09:46:53 +00:00
..
addr_list.c afs: Remove the unimplemented afs_cmp_addr_list() 2024-01-01 16:37:26 +00:00
addr_prefs.c afs: Fix merge preference rule failure condition 2025-01-09 17:21:41 +01:00
afs_cm.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_fs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
afs_vl.h afs: Fix the maximum cell name length 2025-01-07 15:55:25 +01:00
afs.h afs: Fix the maximum cell name length 2025-01-07 15:55:25 +01:00
callback.c afs: Add more tracepoints to do with tracking validity 2024-12-20 22:34:06 +01:00
cell.c afs: Fix afs_atcell_get_link() to handle RCU pathwalk 2025-03-10 09:46:53 +00:00
cmservice.c rxrpc, afs: Allow afs to pin rxrpc_peer objects 2023-12-24 15:22:50 +00:00
dir_edit.c afs: Use the contained hashtable to search a directory 2024-12-20 22:34:09 +01:00
dir_search.c afs: Use the contained hashtable to search a directory 2024-12-20 22:34:09 +01:00
dir_silly.c afs: Simplify error handling 2023-12-24 15:22:53 +00:00
dir.c Provide stable parent and name to ->d_revalidate() instances 2025-01-30 09:13:35 -08:00
dynroot.c afs: Fix afs_atcell_get_link() to handle RCU pathwalk 2025-03-10 09:46:53 +00:00
file.c afs: Add a tracepoint for afs_read_receive() 2024-12-20 22:34:09 +01:00
flock.c afs: adapt to breakup of struct file_lock 2024-02-05 13:11:42 +01:00
fs_operation.c afs: Make {Y,}FS.FetchData an asynchronous operation 2024-12-20 22:34:08 +01:00
fs_probe.c afs: Fix possible infinite loop with unresponsive servers 2024-09-27 18:29:19 +02:00
fsclient.c afs: Make {Y,}FS.FetchData an asynchronous operation 2024-12-20 22:34:08 +01:00
inode.c afs: Locally initialise the contents of a new symlink on creation 2024-12-20 22:34:09 +01:00
internal.h afs: Fix afs_atcell_get_link() to handle RCU pathwalk 2025-03-10 09:46:53 +00:00
Kconfig afs: Convert afs to use the new fscache API 2022-01-07 13:44:47 +00:00
main.c afs: Make {Y,}FS.FetchData an asynchronous operation 2024-12-20 22:34:08 +01:00
Makefile afs: Use the contained hashtable to search a directory 2024-12-20 22:34:09 +01:00
misc.c afs: Simplify error handling 2023-12-24 15:22:53 +00:00
mntpt.c afs: Use netfslib for symlinks, allowing them to be cached 2024-12-20 22:34:07 +01:00
proc.c afs: Fix afs_atcell_get_link() to handle RCU pathwalk 2025-03-10 09:46:53 +00:00
protocol_afs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
protocol_uae.h afs: Add support for the UAE error table 2019-06-28 18:37:53 +01:00
protocol_yfs.h afs: Fix corruption in reads at fpos 2G-4G from an OpenAFS server 2021-09-13 09:14:21 +01:00
rotate.c afs: Add more tracepoints to do with tracking validity 2024-12-20 22:34:06 +01:00
rxrpc.c afs: Make {Y,}FS.FetchData an asynchronous operation 2024-12-20 22:34:08 +01:00
security.c fs: port ->permission() to pass mnt_idmap 2023-01-19 09:24:28 +01:00
server_list.c afs: Fix the server_list to unuse a displaced server rather than putting it 2025-02-21 15:06:29 -08:00
server.c afs: Give an afs_server object a ref on the afs_cell object it points to 2025-02-21 15:06:29 -08:00
super.c afs: Use netfslib for directories 2024-12-20 22:34:07 +01:00
validation.c afs: Add more tracepoints to do with tracking validity 2024-12-20 22:34:06 +01:00
vl_alias.c afs: Fix the maximum cell name length 2025-01-07 15:55:25 +01:00
vl_list.c afs: Dispatch vlserver probes in priority order 2024-01-01 16:37:27 +00:00
vl_probe.c afs: Keep a record of the current fileserver endpoint state 2024-01-01 16:37:27 +00:00
vl_rotate.c afs: Add some more info to /proc/net/afs/servers 2024-01-01 16:36:58 +00:00
vlclient.c vfs-6.14-rc1.netfs 2025-01-20 09:29:11 -08:00
volume.c afs: Increase buffer size in afs_update_volume_status() 2024-02-20 09:51:21 +01:00
write.c afs: Make {Y,}FS.FetchData an asynchronous operation 2024-12-20 22:34:08 +01:00
xattr.c afs: Add __counted_by for struct afs_acl and use struct_size() 2023-12-01 09:51:43 -08:00
xdr_fs.h afs: Fix directory format encoding struct 2024-12-20 22:34:04 +01:00
yfsclient.c vfs-6.14-rc1.afs 2025-01-20 11:40:48 -08:00