From: Dotan Barak Date: Wed, 16 Jul 2014 08:57:48 +0000 (+0300) Subject: net/mlx4_core: Make sure that negative array index isn't used X-Git-Tag: omap-for-v3.17/fixes-against-rc2~149^2~145^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aab2bb0e290bc4f99992cb2198c40eb645647548;p=pandora-kernel.git net/mlx4_core: Make sure that negative array index isn't used To make sure that the array index isn't used in the code with negative value, we stop using the for loop integer iterator outside of it. >From now on use members count to swap the last QP with removed one. Fix also the second occurrence of this flow in mlx4_qp_detach_common(). In mlx4_qp_detach_common() use members_count instead of loop iterator outside of the for loop. Signed-off-by: Dotan Barak Reviewed-by: Yevgeny Petrilin Signed-off-by: Eugenia Emantayev Signed-off-by: Amir Vadai Signed-off-by: David S. Miller --- Reading git-diff-tree failed