Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8047a489 authored by Shigeru Yoshida's avatar Shigeru Yoshida Committed by Greg Kroah-Hartman
Browse files

kcm: Destroy mutex in kcm_exit_net()



[ Upstream commit 6ad40b36cd3b04209e2d6c89d252c873d8082a59 ]

kcm_exit_net() should call mutex_destroy() on knet->mutex. This is especially
needed if CONFIG_DEBUG_MUTEXES is enabled.

Fixes: ab7ac4eb ("kcm: Kernel Connection Multiplexor module")
Signed-off-by: default avatarShigeru Yoshida <syoshida@redhat.com>
Link: https://lore.kernel.org/r/20230902170708.1727999-1-syoshida@redhat.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent a6d11571
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1984,6 +1984,8 @@ static __net_exit void kcm_exit_net(struct net *net)
	 * that all multiplexors and psocks have been destroyed.
	 */
	WARN_ON(!list_empty(&knet->mux_list));

	mutex_destroy(&knet->mutex);
}

static struct pernet_operations kcm_net_ops = {