Commit 6976c7a6 authored by Wang Zhaolong's avatar Wang Zhaolong Committed by Steve French
Browse files

smb: client: Fix NULL pointer dereference in cifs_debug_dirs_proc_show()



Reading /proc/fs/cifs/open_dirs may hit a NULL dereference when
tcon->cfids is NULL.

Add NULL check before accessing cfids to prevent the crash.

Reproduction:
- Mount CIFS share
- cat /proc/fs/cifs/open_dirs

Fixes: 844e5c0e ("smb3 client: add way to show directory leases for improved debugging")
Signed-off-by: default avatarWang Zhaolong <wangzhaolong@huaweicloud.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent b320789d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment