]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Fix EQ deallocation in legacy mode
authorShlomo Pongratz <shlomop@mellanox.com>
Thu, 24 May 2012 13:08:07 +0000 (16:08 +0300)
committerRoland Dreier <roland@purestorage.com>
Mon, 4 Jun 2012 06:02:16 +0000 (23:02 -0700)
commited932039fd97901182df5a90742d7f086baeb2a7
tree9802c1555e813a8f2d8fe1cf5757a94c35e4d8ee
parent77b8f22fbf98a0a312a8283c75b9be320214cb34
IB/mlx4: Fix EQ deallocation in legacy mode

Commit 1d89ca542490 ("IB/mlx4: Increase the number of vectors (EQs)
available for ULPs") didn't handle correctly the case where there
aren't enough MSI-X vectors to increase the number of EQs, so only the
legacy EQs are allocated.  This results in an attempt to memset() to
zero the EQ table which was never allocated and a kernel crash.

Fix this by checking in the teardown flow if the table of EQs was ever
allocated.  Also remove some unneeded setting to zero of the EQ
related fields in struct mlx4_ib_dev.

Signed-off-by: Shlomo Pongratz <shlomop@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c