From: Yishai Hadas Date: Wed, 29 Aug 2012 15:14:35 +0000 (+0000) Subject: mlx4_core: Fix integer overflows so 8TBs of memory registration works X-Git-Tag: v3.6-rc7~35^2^3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd03e73481564fe57655d37154f84a0af00cb449;p=pandora-kernel.git mlx4_core: Fix integer overflows so 8TBs of memory registration works This patch adds on the fixes done in commits 89dd86db78e0 ("mlx4_core: Allow large mlx4_buddy bitmaps") and 3de819e6b642 ("mlx4_core: Fix integer overflow issues around MTT table") so that memory registration of up to 8TB (log_num_mtt=31) finally works. It fixes integer overflows in a few mlx4_table_yyy routines in icm.c by using a u64 intermediate variable, and int/uint issues that caused table indexes to become nagive by setting some variables to be u32 instead of int. These problems cause crashes when a user attempted to register > 512GB of RAM. Signed-off-by: Yishai Hadas Signed-off-by: Or Gerlitz Signed-off-by: Roland Dreier --- Reading git-diff-tree failed