Roland Dreier 8b69844226 IB/mlx4: Fix shutdown crash accessing a non-existent bitmap
commit 4af3ce0de0c12e5c17811eaefad36ab8e146c0fd upstream.

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 <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2012-01-06 14:17:01 -08:00
..
2011-12-09 08:55:21 -08:00
2011-12-09 08:55:21 -08:00
2011-05-20 11:46:11 -07:00