net/mlx5: fix several correctness bugs
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net/mlx5: fix NULL dereference in Tx queue startdrivers/ | +2 | 1 reply | |
| 2/4 | net/mlx5: fix counter leak in hairpin queue setupdrivers/ | +2 | 1 reply | |
| 3/4 | net/mlx5: fix use-after-free in ASO management initdrivers/ | +2 | 1 reply | |
| 4/4 | net/mlx5: fix counter truncation in queue counter readdrivers/ | +8 | 1 reply |
Reviews trailers per patch
All 4 patches have a Reviewed-by or Acked-by.
| Patch | Dariusz Sosnowski |
|---|---|
| 1/4 | A-b |
| 2/4 | A-b |
| 3/4 | A-b |
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFT 0/4] net/mlx5: fix several correctness bugs
Found these during a code review of the mlx5 driver. I don't have ConnectX hardware to test, so sending as RFC for maintainers to verify and test.
Summary:
1/4 NULL pointer dereference in mlx5_txq_start() - txq_ctrl is
dereferenced before the NULL check one line later.
2/4 DevX queue counter leak in hairpin counter setup - the
counter object is not freed when the subsequent modify call fails.
3/4 Use-after-free in ASO age and CT management init - on queue
init failure the management structure is freed but the pointer is not NULLed, so a retry dereferences freed memory.
4/4 64-bit counter truncation - uint64_t* cast to uint32_t*
leaves the upper 32 bits uninitialised, producing wrong hairpin queue statistics.
Stephen Hemminger (4):
net/mlx5: fix NULL dereference in Tx queue start net/mlx5: fix counter leak in hairpin queue setup net/mlx5: fix use-after-free in ASO management init net/mlx5: fix counter truncation in queue counter read
drivers/net/mlx5/mlx5.c | 13 ++++++++++++- drivers/net/mlx5/mlx5_trigger.c | 3 ++- 2 files changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.51.0