mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
19d62f5eea
Fix the implementation of ethtool_convert_link_mode_to_legacy_u32(), which is supposed to return false if src has bits higher than 31 set. The current implementation uses the complement of bitmap_fill(ext, 32) to test high bits of src, which is wrong as bitmap_fill() fills _with long granularity_, and sizeof(long) can be > 4. No users of this function currently check the return value, so the bug was dormant. Also remove the check for __ETHTOOL_LINK_MODE_MASK_NBITS > 32, as the enum ethtool_link_mode_bit_indices contains far beyond 32 values. Using find_next_bit() to test the src bitmask works regardless of this anyway. Signed-off-by: Marco Bonelli <marco@mebeim.net> Link: https://lore.kernel.org/r/20220609134900.11201-1-marco@mebeim.net Signed-off-by: Jakub Kicinski <kuba@kernel.org> |
||
---|---|---|
.. | ||
bitset.c | ||
bitset.h | ||
cabletest.c | ||
channels.c | ||
coalesce.c | ||
common.c | ||
common.h | ||
debug.c | ||
eee.c | ||
eeprom.c | ||
features.c | ||
fec.c | ||
ioctl.c | ||
linkinfo.c | ||
linkmodes.c | ||
linkstate.c | ||
Makefile | ||
module.c | ||
netlink.c | ||
netlink.h | ||
pause.c | ||
phc_vclocks.c | ||
privflags.c | ||
rings.c | ||
stats.c | ||
strset.c | ||
tsinfo.c | ||
tunnels.c | ||
wol.c |