diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2016-06-22 17:27:29 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-06-23 10:07:03 -0400 |
commit | a6100603a4a87fc436199362bdb81cb849faaf6e (patch) | |
tree | b1b993ebf09f7647d1c17ec97c89fb4dd5ede3ff /drivers/power/bq25890_charger.c | |
parent | f2940e2c76bb554a7fbdd28ca5b90904117a9e96 (diff) |
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: 37bfc7c1e83f ("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>
Diffstat (limited to 'drivers/power/bq25890_charger.c')
0 files changed, 0 insertions, 0 deletions