net/mlx5e: kTLS, Fix page refcnt leak in TX resync error flow
authorTariq Toukan <tariqt@mellanox.com>
Wed, 18 Sep 2019 10:57:40 +0000 (13:57 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 18 Oct 2019 19:11:52 +0000 (12:11 -0700)
commitb61b24bd135a7775a2839863bd1d58a462a5f1e5
treea9fbc83c9f2cf9a15964b3310e03ca9bf09e564b
parent310d9b9d37220b590909e90e724fc5f346a98775
net/mlx5e: kTLS, Fix page refcnt leak in TX resync error flow

All references for frag pages that are obtained in tx_sync_info_get()
should be released.
Release usually occurs in the corresponding CQE of the WQE.
In error flows, not all fragments have a WQE posted for them, hence
no matching CQE will be generated.
For these pages, release the reference in the error flow.

Fixes: d2ead1f360e8 ("net/mlx5e: Add kTLS TX HW offload support")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en_accel/ktls_tx.c