linux-hardened/drivers/infiniband
Yishai Hadas a6100603a4 IB/mlx4: Fix error flow when sending mads under SRIOV
Fix mad send error flow to prevent double freeing address handles,
and leaking tx_ring entries when SRIOV is active.

If ib_mad_post_send fails, the address handle pointer in the tx_ring entry
must be set to NULL (or there will be a double-free) and tx_tail must be
incremented (or there will be a leak of tx_ring entries).
The tx_ring is handled the same way in the send-completion handler.

Fixes: 37bfc7c1e8 ("IB/mlx4: SR-IOV multiplex and demultiplex MADs")
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
2016-06-23 10:07:03 -04:00
..
core IB/uverbs: Initialize ib_qp_init_attr with zeros 2016-06-23 10:03:57 -04:00
hw IB/mlx4: Fix error flow when sending mads under SRIOV 2016-06-23 10:07:03 -04:00
sw IB/rdmavt: Annotate rvt_reset_qp() 2016-06-06 19:36:21 -04:00
ulp IB/IPoIB: Don't update neigh validity for unresolved entries 2016-06-07 10:49:48 -04:00
Kconfig IB/hfi1: Move driver out of staging 2016-05-26 11:35:14 -04:00
Makefile IB/rdmavt: Create module framework and handle driver registration 2016-03-10 20:37:04 -05:00