]> 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)
commit5af308f71ca754c31733749aa754f95f70e33ab1
tree9802c1555e813a8f2d8fe1cf5757a94c35e4d8ee
parent1c1a824e2f92648a4427ddb45f9680ef36479f44
IB/mlx4: Fix EQ deallocation in legacy mode

Commit f792dbdea667 ("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