diff mbox series

[net] kcm: Destroy mutex in kcm_exit_net()

Message ID 20230902170708.1727999-1-syoshida@redhat.com (mailing list archive)
State Accepted
Commit 6ad40b36cd3b04209e2d6c89d252c873d8082a59
Delegated to: Netdev Maintainers
Headers show
Series [net] kcm: Destroy mutex in kcm_exit_net() | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1330 this patch: 1330
netdev/cc_maintainers fail 1 blamed authors not CCed: tom@herbertland.com; 2 maintainers not CCed: dhowells@redhat.com tom@herbertland.com
netdev/build_clang success Errors and warnings before: 1353 this patch: 1353
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 1353 this patch: 1353
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Shigeru Yoshida Sept. 2, 2023, 5:07 p.m. UTC
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>
---
 net/kcm/kcmsock.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 5, 2023, 8:23 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Sun,  3 Sep 2023 02:07:08 +0900 you wrote:
> 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>
> ---
>  net/kcm/kcmsock.c | 2 ++
>  1 file changed, 2 insertions(+)

Here is the summary with links:
  - [net] kcm: Destroy mutex in kcm_exit_net()
    https://git.kernel.org/netdev/net/c/6ad40b36cd3b

You are awesome, thank you!
diff mbox series

Patch

diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 393f01b2a7e6..4580f61426bb 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -1859,6 +1859,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 = {