git: 8b144c015c9c - main - cxgbe(4): Destroy the tick mutex during VI detach.

From: Navdeep Parhar <np_at_FreeBSD.org>
Date: Wed, 03 Jan 2024 00:06:54 UTC
The branch main has been updated by np:

URL: https://cgit.FreeBSD.org/src/commit/?id=8b144c015c9cce0bc99a7fbdc43f22f51a946d2c

commit 8b144c015c9cce0bc99a7fbdc43f22f51a946d2c
Author:     Navdeep Parhar <np@FreeBSD.org>
AuthorDate: 2023-12-27 21:00:29 +0000
Commit:     Navdeep Parhar <np@FreeBSD.org>
CommitDate: 2024-01-02 22:08:00 +0000

    cxgbe(4): Destroy the tick mutex during VI detach.
    
    This avoids a mutex reinitialization when the VI is detached and
    reattached.
    
    Fixes:  516fe911a6b7 cxgbe(4): Always use the per-VI callout to read interface stats.
    MFC after:      1 week
    Sponsored by:   Chelsio Communications
---
 sys/dev/cxgbe/t4_main.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys/dev/cxgbe/t4_main.c b/sys/dev/cxgbe/t4_main.c
index a32cd9a3f2df..570208e2c562 100644
--- a/sys/dev/cxgbe/t4_main.c
+++ b/sys/dev/cxgbe/t4_main.c
@@ -2733,6 +2733,7 @@ cxgbe_vi_detach(struct vi_info *vi)
 #endif
 	cxgbe_uninit_synchronized(vi);
 	callout_drain(&vi->tick);
+	mtx_destroy(&vi->tick_mtx);
 	sysctl_ctx_free(&vi->ctx);
 	vi_full_uninit(vi);