diff options
| author | Linus Torvalds <[email protected]> | 2025-03-13 17:53:25 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2025-03-13 17:53:25 +0000 |
| commit | 8f7617f4500900f39b604ca724a34a9cfd1fa63a (patch) | |
| tree | ce68936726e5db07f2c6fc2ae9e0b57accebf680 /fs/afs/proc.c | |
| parent | Merge tag 'sched_ext-for-6.14-rc6-fixes' of git://git.kernel.org/pub/scm/linu... (diff) | |
| parent | vboxsf: Add __nonstring annotations for unterminated strings (diff) | |
| download | kernel-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.c | 4 |
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"); |
