kcm: Destroy mutex in kcm_exit_net()
[ Upstream commit6ad40b36cd] kcm_exit_net() should call mutex_destroy() on knet->mutex. This is especially needed if CONFIG_DEBUG_MUTEXES is enabled. Fixes:ab7ac4eb98("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
746a8df5e4
commit
46f02fc7f6
@@ -1982,6 +1982,8 @@ static __net_exit void kcm_exit_net(struct net *net)
|
|||||||
* that all multiplexors and psocks have been destroyed.
|
* that all multiplexors and psocks have been destroyed.
|
||||||
*/
|
*/
|
||||||
WARN_ON(!list_empty(&knet->mux_list));
|
WARN_ON(!list_empty(&knet->mux_list));
|
||||||
|
|
||||||
|
mutex_destroy(&knet->mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pernet_operations kcm_net_ops = {
|
static struct pernet_operations kcm_net_ops = {
|
||||||
|
|||||||
Reference in New Issue
Block a user