linux/drivers/net/ethernet/cavium
Colin Ian King e701a25840 net: thunderx: Fix unintentional sign extension issue
The shifting of the u8 integers rq->caching by 26 bits to
the left will be promoted to a 32 bit signed int and then
sign-extended to a u64. In the event that rq->caching is
greater than 0x1f then all then all the upper 32 bits of
the u64 end up as also being set because of the int
sign-extension. Fix this by casting the u8 values to a
u64 before the 26 bit left shift.

Addresses-Coverity: ("Unintended sign extension")
Fixes: 4863dea3fa ("net: Adding support for Cavium ThunderX network controller")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-04-12 13:13:57 -07:00
..
common net: cavium: Fix a bunch of kerneldoc parameter issues 2020-09-09 14:11:58 -07:00
liquidio liquidio: Fix unintented sign extension of a left shift of a u16 2021-04-07 14:54:49 -07:00
octeon net/ethernet: convert to use module_platform_driver in octeon_mgmt.c 2021-01-29 19:02:43 -08:00
thunder net: thunderx: Fix unintentional sign extension issue 2021-04-12 13:13:57 -07:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00