diff options
author | Christian Brauner <[email protected]> | 2024-09-06 18:22:22 +0200 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2024-09-06 11:08:58 -0700 |
commit | 4e32c25b58b945f976435bbe51f39b32d714052e (patch) | |
tree | 3fbe16437b77046889ff6aa620f74acb2c66689e /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | b831f83e40a24f07c8dcba5be408d93beedc820f (diff) |
libfs: fix get_stashed_dentry()
get_stashed_dentry() tries to optimistically retrieve a stashed dentry
from a provided location. It needs to ensure to hold rcu lock before it
dereference the stashed location to prevent UAF issues. Use
rcu_dereference() instead of READ_ONCE() it's effectively equivalent
with some lockdep bells and whistles and it communicates clearly that
this expects rcu protection.
Link: https://lore.kernel.org/r/20240906-vfs-hotfix-5959800ffa68@brauner
Fixes: 07fd7c329839 ("libfs: add path_from_stashed()")
Reported-by: [email protected]
Fixes: [email protected]
Reported-by: [email protected]
Fixes: [email protected]
Signed-off-by: Christian Brauner <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions