diff options
author | Namjae Jeon <linkinjeon@kernel.org> | 2023-04-21 16:09:01 +0900 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2023-04-24 00:09:20 -0500 |
commit | 74d7970febf7e9005375aeda0df821d2edffc9f7 (patch) | |
tree | 0f4dbbd9bb7a756397c8b33d17b6066200b17fc8 /fs/internal.h | |
parent | ksmbd: remove unused compression negotiate ctx packing (diff) | |
download | wireguard-linux-74d7970febf7e9005375aeda0df821d2edffc9f7.tar.xz wireguard-linux-74d7970febf7e9005375aeda0df821d2edffc9f7.zip |
ksmbd: fix racy issue from using ->d_parent and ->d_name
Al pointed out that ksmbd has racy issue from using ->d_parent and ->d_name
in ksmbd_vfs_unlink and smb2_vfs_rename(). and use new lock_rename_child()
to lock stable parent while underlying rename racy.
Introduce vfs_path_parent_lookup helper to avoid out of share access and
export vfs functions like the following ones to use
vfs_path_parent_lookup().
- rename __lookup_hash() to lookup_one_qstr_excl().
- export lookup_one_qstr_excl().
- export getname_kernel() and putname().
vfs_path_parent_lookup() is used for parent lookup of destination file
using absolute pathname given from FILE_RENAME_INFORMATION request.
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/internal.h')
0 files changed, 0 insertions, 0 deletions