Colin Ian King
4601bcc641
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: 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 >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2021-05-14 09:50:36 +02:00
..
2020-10-15 18:42:13 -07:00
2020-10-01 19:08:46 -07:00
2020-08-24 17:33:11 -07:00
2020-07-07 15:44:27 -07:00
2020-12-04 14:42:21 -08:00
2020-08-23 17:36:59 -05:00
2020-12-30 11:53:57 +01:00
2020-09-14 13:02:37 -07:00
2020-11-24 16:07:13 -08:00
2021-04-21 13:00:54 +02:00
2020-08-27 06:55:50 -07:00
2021-04-07 15:00:08 +02:00
2020-09-25 16:29:00 -07:00
2021-03-17 17:06:10 +01:00
2021-03-17 17:06:17 +01:00
2020-10-03 17:33:23 -07:00
2021-04-21 13:00:56 +02:00
2020-09-25 16:29:00 -07:00
2021-05-14 09:50:36 +02:00
2021-05-14 09:50:36 +02:00
2020-08-18 12:54:47 -07:00
2020-10-20 10:28:21 -07:00
2020-09-25 16:29:00 -07:00
2021-04-21 13:00:57 +02:00
2020-09-25 16:29:00 -07:00
2020-09-14 13:02:37 -07:00
2020-08-23 17:36:59 -05:00
2021-03-30 14:31:58 +02:00
2021-04-14 08:42:07 +02:00
2020-10-30 16:57:41 -05:00
2021-05-14 09:50:32 +02:00
2020-10-05 18:40:01 -07:00
2020-09-25 06:20:45 +02:00
2021-04-21 13:00:58 +02:00
2021-05-07 11:04:31 +02:00
2021-04-10 13:36:08 +02:00
2021-03-17 17:06:14 +01:00
2021-05-11 14:47:34 +02:00
2020-10-03 17:33:23 -07:00
2020-12-30 11:53:56 +01:00
2021-03-17 17:06:15 +01:00
2021-04-14 08:42:07 +02:00
2021-01-17 14:16:55 +01:00
2020-09-29 14:02:54 -07:00
2021-04-14 08:42:08 +02:00
2020-09-14 13:02:38 -07:00
2020-12-04 14:42:21 -08:00
2020-09-25 16:29:00 -07:00
2020-09-25 16:29:00 -07:00
2020-12-02 18:03:58 -08:00
2021-03-30 14:32:01 +02:00
2021-03-30 14:31:58 +02:00
2020-11-16 16:34:49 -08:00
2020-07-20 17:49:50 -07:00
2021-04-21 13:00:59 +02:00
2021-03-17 17:06:33 +01:00
2020-12-04 14:42:21 -08:00
2020-09-25 16:29:00 -07:00
2020-09-25 06:20:45 +02:00
2021-05-11 14:47:36 +02:00
2020-08-03 16:00:26 -07:00
2020-09-14 13:02:38 -07:00
2020-09-25 16:29:00 -07:00
2020-09-14 13:02:38 -07:00
2021-03-30 14:31:53 +02:00
2021-03-30 14:32:03 +02:00
2021-03-30 14:31:48 +02:00
2020-09-25 16:29:00 -07:00
2021-03-30 14:31:48 +02:00
2021-01-12 20:18:11 +01:00
2020-09-08 20:16:19 -07:00
2020-10-05 18:40:01 -07:00
2021-03-30 14:32:05 +02:00
2020-08-23 17:36:59 -05:00
2020-09-25 16:29:00 -07:00
2021-01-12 20:18:10 +01:00
2020-07-20 18:32:49 -07:00
2020-09-14 13:02:37 -07:00
2020-07-13 17:45:04 -07:00
2020-12-30 11:53:57 +01:00
2020-09-23 18:01:03 -07:00