aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/proc.c
diff options
context:
space:
mode:
authorLinus Torvalds <[email protected]>2025-03-13 17:53:25 +0000
committerLinus Torvalds <[email protected]>2025-03-13 17:53:25 +0000
commit8f7617f4500900f39b604ca724a34a9cfd1fa63a (patch)
treece68936726e5db07f2c6fc2ae9e0b57accebf680 /fs/afs/proc.c
parentMerge tag 'sched_ext-for-6.14-rc6-fixes' of git://git.kernel.org/pub/scm/linu... (diff)
parentvboxsf: Add __nonstring annotations for unterminated strings (diff)
downloadkernel-8f7617f4500900f39b604ca724a34a9cfd1fa63a.tar.gz
kernel-8f7617f4500900f39b604ca724a34a9cfd1fa63a.zip
Merge tag 'vfs-6.14-rc7.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner: - Bring in an RCU pathwalk fix for afs. This is brought in as a merge from the vfs-6.15.shared.afs branch that needs this commit and other trees already depend on it. - Fix vboxfs unterminated string handling. * tag 'vfs-6.14-rc7.fixes' of gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs: vboxsf: Add __nonstring annotations for unterminated strings afs: Fix afs_atcell_get_link() to handle RCU pathwalk
Diffstat (limited to 'fs/afs/proc.c')
-rw-r--r--fs/afs/proc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index e7614f4f30c2..12c88d8be3fe 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -206,7 +206,7 @@ static int afs_proc_rootcell_show(struct seq_file *m, void *v)
net = afs_seq2net_single(m);
down_read(&net->cells_lock);
- cell = net->ws_cell;
+ cell = rcu_dereference_protected(net->ws_cell, lockdep_is_held(&net->cells_lock));
if (cell)
seq_printf(m, "%s\n", cell->name);
up_read(&net->cells_lock);
@@ -242,7 +242,7 @@ static int afs_proc_rootcell_write(struct file *file, char *buf, size_t size)
ret = -EEXIST;
inode_lock(file_inode(file));
- if (!net->ws_cell)
+ if (!rcu_access_pointer(net->ws_cell))
ret = afs_cell_init(net, buf);
else
printk("busy\n");