Skip to content

Commit 6747885

Browse files
namjaejeonsmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent d8b6dc9 commit 6747885

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/smb/server/transport_tcp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,8 @@ static int ksmbd_kthread_fn(void *p)
266266
max_ip_conns++;
267267
#endif
268268
if (server_conf.max_ip_connections <= max_ip_conns) {
269+
pr_info_ratelimited("Maximum IP connections exceeded (%u/%u)\n",
270+
max_ip_conns, server_conf.max_ip_connections);
269271
ret = -EAGAIN;
270272
break;
271273
}

0 commit comments

Comments
 (0)