]> git.droids-corp.org - dpdk.git/commit
net/mlx4: fix buffer leakage on device close
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Sat, 17 Apr 2021 17:14:14 +0000 (20:14 +0300)
committerRaslan Darawsheh <rasland@nvidia.com>
Wed, 28 Apr 2021 06:43:31 +0000 (08:43 +0200)
commitb014c6b7b595277860308468c4c12a9337bf132e
tree51bd84253b9811fb8f8667c02b46e1d3f9d2b45f
parenta4af5eed4091f74c10381f1e5d5ec1a058f19a9a
net/mlx4: fix buffer leakage on device close

The mlx4 PMD tracks the buffers (mbufs) for the packets being
transmitted in the dedicated array named as "elts". The tx_burst
routine frees the mbufs from this array once it needs to rearm
the hardware descriptor and store the new mbuf, so it looks
like as replacement mbuf pointer in the elts array.

On the device stop mlx4 PMD freed only the part of elts according
tail and head pointers, leaking the rest of buffers, remained in
the elts array.

Fixes: a2ce2121c01c ("net/mlx4: separate Tx configuration functions")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
drivers/net/mlx4/mlx4_rxtx.c
drivers/net/mlx4/mlx4_txq.c