Skip to content

net/ice: fix memory handling issues

Anurag Mandal dpdk-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2net/ice: free memory with matching allocatordrivers/net/intel/ice/ice_acl_filter.c drivers/net/intel/ice/ice_dcf.c drivers/net/intel/ice/ice_dcf_parent.c +3 more+29 -291 reply
2/2net/ice: fix unchecked Tx time context allocationdrivers/net/intel/ice/ice_rxtx.c+4 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchAnatoly BurakovBruce Richardson
1/2A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] net/ice: fix memory handling issues

This patch series addresses two memory handling issues in the ice PMD.

- The first one makes memory allocation and release symmetric. Several buffers obtained through ice_malloc(), ice_calloc() or ice_memdup() were released with rte_free() instead of ice_free(). Both APIs currently map to the same underlying allocator. However, mixing them is inconsistent and would break if the OS abstraction layer ever changes.

- The second one fixes an unchecked allocation in ice_tx_queue_start() which dereferences the Tx time queue context buffer returned by ice_malloc() without NULL check.
On allocation failure, the E830 send-on-timestamp path therefore crashes instead of reporting "No Memory" error, and also the already allocated txq_elem buffer gets leaked.

Anurag Mandal (2):
net/ice: free memory with matching allocator net/ice: fix unchecked Tx time context allocation

 drivers/net/intel/ice/ice_acl_filter.c  | 10 +++++-----
 drivers/net/intel/ice/ice_dcf.c         |  2 +-
 drivers/net/intel/ice/ice_dcf_parent.c  |  2 +-
 drivers/net/intel/ice/ice_ethdev.c      | 14 +++++++-------
 drivers/net/intel/ice/ice_fdir_filter.c | 12 ++++++------
 drivers/net/intel/ice/ice_rxtx.c        | 22 +++++++++++++---------
 6 files changed, 33 insertions(+), 29 deletions(-)
Signature · 1 line
2.34.1