diff options
| author | Colin Ian King <colin.king@canonical.com> | 2021-04-09 14:07:26 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-22 10:38:25 +0200 |
| commit | e8681a4596b8cbbce8e2fd06a56b5a17e927bd90 (patch) | |
| tree | f7dbc9d3dee4f9735da4cf757bde7188e20fd06a /tools/perf/scripts/python/bin | |
| parent | f4c9ba3be5e8bfd0ed5220da91539388d66a7fca (diff) | |
net: thunderx: Fix unintentional sign extension issue
[ Upstream commit e701a25840360706fe4cf5de0015913ca19c274b ]
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: 4863dea3fab0 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions
