diff options
| author | Shigeru Yoshida <syoshida@redhat.com> | 2023-09-03 02:07:08 +0900 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-09-23 10:59:59 +0200 |
| commit | 8047a48984989bf6872aadfa5bfa399852420674 (patch) | |
| tree | ed51237d7ad4be8fb629a078b93625b7de77ad09 /net/kcm | |
| parent | a6d11571b91d34fd7ce8451c2dfd112194c79ae2 (diff) | |
| download | linux-8047a48984989bf6872aadfa5bfa399852420674.tar.gz linux-8047a48984989bf6872aadfa5bfa399852420674.tar.bz2 linux-8047a48984989bf6872aadfa5bfa399852420674.zip | |
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: ab7ac4eb9832 ("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>
Diffstat (limited to 'net/kcm')
| -rw-r--r-- | net/kcm/kcmsock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index 1975403ce8be..50bcfc71389a 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -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 = { |
