]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlx4_core: Extend num_mtt in dev caps to avoid overflow.
authorMajd Dibbiny <majd@mellanox.com>
Tue, 27 Aug 2013 11:07:36 +0000 (14:07 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:45:13 +0000 (14:45 -0700)
commita15f6fc5eb000c0287afdb03c2e696b73b634012
tree02b932dff2841e62fb77c28d1b863ad1cb8b77c3
parent1a2fb2295b1378d7b3e4f139e121db6989c6a271
mlx4_core: Extend num_mtt in dev caps to avoid overflow.

Some legitimate combinations of log_num_mtt and log_mtts_per_seg
cause overflow in the calculation of the num_mtt when initializing
the HCA which causes Kernel panic. Changed the variable to be 'u64'
instead of 'int' to avoid the overflow and made the needed changes
to support the new type.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/icm.c
drivers/net/ethernet/mellanox/mlx4/icm.h
drivers/net/ethernet/mellanox/mlx4/mr.c
drivers/net/ethernet/mellanox/mlx4/profile.c
include/linux/mlx4/device.h