summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-sensor-hub.c
diff options
context:
space:
mode:
authorAya Levin <ayal@mellanox.com>2018-11-15 18:05:15 +0200
committerBen Hutchings <ben@decadent.org.uk>2019-02-11 17:54:05 +0000
commit29a806c51fa209de6fbc7f849766eff5c3e301b7 (patch)
tree5051a38a431b00cedbb9839559f485bfa47e55ef /drivers/hid/hid-sensor-hub.c
parent3c06d804e3a5cf491656bccfb96a73d177529bb6 (diff)
downloadlinux-stable-29a806c51fa209de6fbc7f849766eff5c3e301b7.tar.gz
linux-stable-29a806c51fa209de6fbc7f849766eff5c3e301b7.tar.bz2
linux-stable-29a806c51fa209de6fbc7f849766eff5c3e301b7.zip
net/mlx4: Fix UBSAN warning of signed integer overflow
commit a463146e67c848cbab5ce706d6528281b7cded08 upstream. 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: 5a0d0a6161ae ("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: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/hid/hid-sensor-hub.c')
0 files changed, 0 insertions, 0 deletions