Thread (32 messages) 32 messages, 4 authors, 2025-06-05
STALE388d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 net-next 4/7] smb: client: Add missing net_passive_dec().

From: Kuniyuki Iwashima <hidden>
Date: 2025-05-23 18:24:05
Also in: linux-nfs, linux-nvme, linux-rdma, mptcp, stable
Subsystem: common internet file system client (cifs and smb3), filesystems (vfs and infrastructure), the rest · Maintainers: Steve French, Alexander Viro, Christian Brauner, Linus Torvalds

While reverting commit e9f2517a3e18 ("smb: client: fix TCP timers deadlock
after rmmod"), I should have added net_passive_dec(), which was added
between the original commit and the revert by commit 5c70eb5c593d ("net:
better track kernel sockets lifetime").

Let's call net_passive_dec() in generic_ip_connect().

Note that this commit is only needed for 6.14+.

Fixes: 95d2b9f693ff ("Revert "smb: client: fix TCP timers deadlock after rmmod"")
Cc: <redacted> # 6.14.x
Signed-off-by: Kuniyuki Iwashima <redacted>
---
 fs/smb/client/connect.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
index 37a2ba38f10e..afac23a5a3ec 100644
--- a/fs/smb/client/connect.c
+++ b/fs/smb/client/connect.c
@@ -3359,6 +3359,7 @@ generic_ip_connect(struct TCP_Server_Info *server)
 
 		sk = server->ssocket->sk;
 		__netns_tracker_free(net, &sk->ns_tracker, false);
+		net_passive_dec(net);
 		sk->sk_net_refcnt = 1;
 		get_net_track(net, &sk->ns_tracker, GFP_KERNEL);
 		sock_inuse_add(net, 1);
-- 
2.49.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help