From: Roland Dreier Date: Tue, 6 Dec 2011 18:47:37 +0000 (-0800) Subject: IB/mlx4: Fix shutdown crash accessing a non-existent bitmap X-Git-Tag: v3.2-rc7~39^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af3ce0de0c12e5c17811eaefad36ab8e146c0fd;p=pandora-kernel.git IB/mlx4: Fix shutdown crash accessing a non-existent bitmap Commit cfcde11c3d7a ("IB/mlx4: Use flow counters on IBoE ports") added code that sets elements of counters[] to -1 if no counter is allocated, but then goes ahead and passes every entry to mlx4_counter_free() on shutdown. This is a bad idea, especially if MLX4_DEV_CAP_FLAG_COUNTERS isn't set so there isn't even an underlying bitmap to free from. Tested-by: Sean Hefty Cc: Signed-off-by: Roland Dreier --- Reading git-diff-tree failed