Aya Levin
89860d2ca0
net/mlx4: Fix UBSAN warning of signed integer overflow
...
[ Upstream commit a463146e67 ]
UBSAN: Undefined behavior in
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c:626:29
signed integer overflow: 1802201963 + 1802201963 cannot be represented
in type 'int'
The union of res_reserved and res_port_rsvd[MLX4_MAX_PORTS] monitors
granting of reserved resources. The grant operation is calculated and
protected, thus both members of the union cannot be negative. Changed
type of res_reserved and of res_port_rsvd[MLX4_MAX_PORTS] from signed
int to unsigned int, allowing large value.
Fixes: 5a0d0a6161 ("mlx4: Structures and init/teardown for VF resource quotas")
Signed-off-by: Aya Levin <ayal@mellanox.com >
Signed-off-by: Tariq Toukan <tariqt@mellanox.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
Signed-off-by: Sasha Levin <sashal@kernel.org >
2018-12-13 09:20:26 +01:00
..
2018-11-27 16:09:41 +01:00
2018-05-01 15:13:08 -07:00
2018-12-08 13:05:07 +01:00
2018-11-10 07:42:59 -08:00
2018-07-22 14:27:36 +02:00
2018-10-13 09:18:54 +02:00
2018-12-01 09:44:20 +01:00
2018-11-27 16:09:40 +01:00
2018-12-05 19:42:41 +01:00
2018-11-21 09:25:57 +01:00
2018-11-13 11:16:54 -08:00
2018-11-27 16:09:39 +01:00
2018-11-21 09:26:01 +01:00
2018-12-01 09:44:20 +01:00
2018-07-03 11:23:08 +02:00
2018-11-13 11:16:53 -08:00
2018-02-28 10:18:33 +01:00
2018-04-13 19:48:09 +02:00
2018-12-05 19:42:40 +01:00
2018-06-06 16:44:33 +02:00
2018-11-13 11:16:56 -08:00
2018-05-30 07:50:18 +02:00
2018-12-05 19:42:42 +01:00
2018-12-01 09:44:18 +01:00
2018-12-08 13:05:07 +01:00
2018-12-13 09:20:25 +01:00
2018-03-24 11:00:12 +01:00
2018-12-05 19:42:41 +01:00
2018-11-27 16:09:39 +01:00
2018-11-13 11:16:53 -08:00
2018-11-13 11:16:48 -08:00
2018-05-30 07:50:47 +02:00
2018-02-25 11:05:55 +01:00
2018-12-05 19:42:41 +01:00
2018-12-08 13:05:06 +01:00
2018-12-08 13:05:07 +01:00
2018-12-13 09:20:25 +01:00
2018-09-15 09:42:58 +02:00
2018-08-22 07:47:14 +02:00
2018-04-13 19:48:03 +02:00
2018-10-20 09:51:32 +02:00
2018-09-09 20:01:19 +02:00
2018-11-13 11:17:05 -08:00
2018-12-13 09:20:25 +01:00
2018-08-03 07:55:24 +02:00
2018-05-25 16:13:06 +02:00
2018-10-18 09:13:20 +02:00
2018-12-05 19:42:41 +01:00
2018-11-13 11:16:49 -08:00
2018-11-21 09:26:00 +01:00
2018-12-13 09:20:26 +01:00
2018-12-01 09:44:21 +01:00
2018-05-30 07:50:22 +02:00
2018-11-13 11:16:55 -08:00
2018-11-10 07:42:55 -08:00
2018-08-03 07:55:22 +02:00
2018-12-01 09:44:21 +01:00
2018-05-30 07:50:43 +02:00
2018-09-26 08:36:38 +02:00
2018-11-13 11:16:56 -08:00
2018-11-13 11:16:46 -08:00
2018-03-22 09:17:51 +01:00
2018-12-01 09:44:20 +01:00
2018-11-27 16:09:38 +01:00
2018-10-03 17:01:43 -07:00
2018-04-13 19:47:56 +02:00
2018-11-10 07:43:00 -08:00
2018-09-09 20:01:25 +02:00
2018-10-03 17:01:49 -07:00
2018-12-08 13:05:08 +01:00
2018-11-13 11:17:03 -08:00
2018-12-01 09:44:20 +01:00
2018-12-05 19:42:38 +01:00
2018-12-08 13:05:06 +01:00
2018-11-13 11:17:04 -08:00
2018-10-03 17:01:49 -07:00
2018-12-08 13:05:05 +01:00
2018-10-18 09:13:20 +02:00
2018-11-13 11:17:02 -08:00
2018-10-03 17:01:51 -07:00
2018-04-24 09:34:12 +02:00
2018-12-08 13:05:07 +01:00
2018-11-27 16:09:41 +01:00
2018-12-08 13:05:09 +01:00
2018-10-03 17:01:42 -07:00
2018-08-03 07:55:13 +02:00
2018-11-21 09:26:00 +01:00
2018-11-21 09:26:00 +01:00
2018-09-15 09:42:57 +02:00
2018-11-13 11:17:01 -08:00
2018-05-30 07:50:34 +02:00
2018-11-23 08:20:37 +01:00
2018-05-30 07:50:44 +02:00
2018-02-25 11:05:45 +01:00