]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ksmbd: add an error print when maximum IP connections limit is reached
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 29 Sep 2025 00:08:36 +0000 (09:08 +0900)
committerSteve French <stfrench@microsoft.com>
Wed, 1 Oct 2025 02:37:54 +0000 (21:37 -0500)
This change introduces an error print using pr_info_ratelimited()
to prevent excessive logging. This message will inform the user that
the limit for maximum IP connections has been hit and what that
current count is, which can be useful for debugging and monitoring
connection limits.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/server/transport_tcp.c

index e9ecb43db9d9865ad9be24a500d8569e5f54da4f..f42acb544a0c439775abb3f6b3c26acb2f5896e0 100644 (file)
@@ -266,6 +266,8 @@ static int ksmbd_kthread_fn(void *p)
                                max_ip_conns++;
 #endif
                        if (server_conf.max_ip_connections <= max_ip_conns) {
+                               pr_info_ratelimited("Maximum IP connections exceeded (%u/%u)\n",
+                                                   max_ip_conns, server_conf.max_ip_connections);
                                ret = -EAGAIN;
                                break;
                        }