Skip to content

Commit 6ad40b3

Browse files
Shigeru YoshidaPaolo Abeni
authored andcommitted
kcm: Destroy mutex in kcm_exit_net()
kcm_exit_net() should call mutex_destroy() on knet->mutex. This is especially needed if CONFIG_DEBUG_MUTEXES is enabled. Fixes: ab7ac4e ("kcm: Kernel Connection Multiplexor module") Signed-off-by: Shigeru Yoshida <syoshida@redhat.com> Link: https://lore.kernel.org/r/20230902170708.1727999-1-syoshida@redhat.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 8fc134f commit 6ad40b3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/kcm/kcmsock.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,6 +1859,8 @@ static __net_exit void kcm_exit_net(struct net *net)
18591859
* that all multiplexors and psocks have been destroyed.
18601860
*/
18611861
WARN_ON(!list_empty(&knet->mux_list));
1862+
1863+
mutex_destroy(&knet->mutex);
18621864
}
18631865

18641866
static struct pernet_operations kcm_net_ops = {

0 commit comments

Comments
 (0)