diff options
| author | 2026-09-12 00:35:13 +0800 | |
|---|---|---|
| committer | 2026-10-21 08:55:12 +0900 | |
| commit | 2bc1d25fc8597fa6cbf6b1ff92653881939a6436 (patch) | |
| tree | 390c06c26cde969206b393c5549bd806a80f041e /scripts/Makefile.thinlto | |
| parent | ksmbd: fix invalid pointer dereference when get_inode_acl() fails (diff) | |
ksmbd: fix link speed query in fsctl_query_iface_info_ioctl()
fsctl_query_iface_info_ioctl() used to call
netdev->ethtool_ops->get_link_ksettings() directly and never checked the
return value. If the callback fails, cmd.base.speed may be left
uninitialized. Also, SPEED_UNKNOWN (-1) is treated as a numeric link speed
and would be converted into a bogus link speed.
Use __ethtool_get_link_ksettings() to acquire the per-netdev ops lock when
needed. Fall back to 1Gbps when the query fails, or when the reported speed
is 0 or SPEED_UNKNOWN.
Fixes: e2f34481b24d ("cifsd: add server-side procedures for SMB3")
Signed-off-by: Henry Hu <huhai@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
