diff options
| author | David Howells <[email protected]> | 2025-03-06 08:46:57 +0000 |
|---|---|---|
| committer | David Howells <[email protected]> | 2025-03-10 09:46:53 +0000 |
| commit | 823869e1e61607ab0d433de3c8abed221dc80a5e (patch) | |
| tree | d2b170a71004d62824f7c6cb88dc06fbe7ffefe6 /net/switchdev/switchdev.c | |
| parent | Merge tag 'net-6.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/net... (diff) | |
| download | kernel-823869e1e61607ab0d433de3c8abed221dc80a5e.tar.gz kernel-823869e1e61607ab0d433de3c8abed221dc80a5e.zip | |
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: 30bca65bbbae ("afs: Make /afs/@cell and /afs/.@cell symlinks")
Reported-by: Alexander Viro <[email protected]>
Signed-off-by: David Howells <[email protected]>
cc: Marc Dionne <[email protected]>
cc: [email protected]
cc: [email protected]
Link: https://lore.kernel.org/r/[email protected]/ # v4
Diffstat (limited to 'net/switchdev/switchdev.c')
0 files changed, 0 insertions, 0 deletions
