From: Namjae Jeon Date: Mon, 29 Sep 2025 00:08:36 +0000 (+0900) Subject: ksmbd: add an error print when maximum IP connections limit is reached X-Git-Tag: v6.18-rc1~111^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=67478857817be1585900ec49662e5b8f6ab6e3ef;p=thirdparty%2Flinux.git ksmbd: add an error print when maximum IP connections limit is reached 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 Signed-off-by: Steve French --- diff --git a/fs/smb/server/transport_tcp.c b/fs/smb/server/transport_tcp.c index e9ecb43db9d98..f42acb544a0c4 100644 --- a/fs/smb/server/transport_tcp.c +++ b/fs/smb/server/transport_tcp.c @@ -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; }