diff options
author | Enzo Matsumiya <ematsumiya@suse.de> | 2021-09-10 00:46:45 +0300 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2021-09-10 01:34:38 +0300 |
commit | 9351590f51cdda49d0265932a37f099950998504 (patch) | |
tree | c6ef9ed51281ca9388482d589a448a83ac9c0810 /lib/kunit/executor.c | |
parent | 8d014f5fe98142b79dfa3bcd0d9483a5165f3570 (diff) | |
download | linux-9351590f51cdda49d0265932a37f099950998504.tar.xz |
cifs: properly invalidate cached root handle when closing it
Cached root file was not being completely invalidated sometimes.
Reproducing:
- With a DFS share with 2 targets, one disabled and one enabled
- start some I/O on the mount
# while true; do ls /mnt/dfs; done
- at the same time, disable the enabled target and enable the disabled
one
- wait for DFS cache to expire
- on reconnect, the previous cached root handle should be invalid, but
open_cached_dir_by_dentry() will still try to use it, but throws a
use-after-free warning (kref_get())
Make smb2_close_cached_fid() invalidate all fields every time, but only
send an SMB2_close() when the entry is still valid.
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'lib/kunit/executor.c')
0 files changed, 0 insertions, 0 deletions