git: d2a788a522f7 - main - mlx5en: Add missing refcount decrement on link-down.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 17 Feb 2022 12:13:48 UTC
The branch main has been updated by hselasky: URL: https://cgit.FreeBSD.org/src/commit/?id=d2a788a522f78f7c4b014df9097348419d90fae4 commit d2a788a522f78f7c4b014df9097348419d90fae4 Author: Hans Petter Selasky <hselasky@FreeBSD.org> AuthorDate: 2022-02-17 11:45:25 +0000 Commit: Hans Petter Selasky <hselasky@FreeBSD.org> CommitDate: 2022-02-17 12:13:09 +0000 mlx5en: Add missing refcount decrement on link-down. MFC after: 1 week Sponsored by: NVIDIA Networking --- sys/dev/mlx5/mlx5_en/mlx5_en_iq.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c index e375864dc85f..6553b002aa1b 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_iq.c @@ -141,6 +141,10 @@ mlx5e_iq_free_db(struct mlx5e_iq *iq) iq->data[x].callback(iq->data[x].arg); iq->data[x].callback = NULL; } + if (unlikely(iq->data[x].p_refcount != NULL)) { + atomic_add_int(iq->data[x].p_refcount, -1); + iq->data[x].p_refcount = NULL; + } bus_dmamap_destroy(iq->dma_tag, iq->data[x].dma_map); } free(iq->data, M_MLX5EN);