From 92db30225eba52d330eda2dd92311afac47bb7df Mon Sep 17 00:00:00 2001 From: Gael Blivet Date: Tue, 7 Jul 2026 11:55:05 +0200 Subject: [PATCH] ksmbd: quiet mdssvc RPC log spam macOS routinely probes the mdssvc RPC pipe to check for Spotlight search support. __rpc_method() already falls through to returning 0 (unsupported) for it via the default case, but that path also logs "Unsupported RPC: mdssvc" via pr_err on every single probe -- which happens often enough during normal macOS browsing/backup activity to spam the kernel log. Add an explicit case that returns the same value without the log line; behavior is unchanged, this only removes noise for an expected, routine client behavior. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Gael Blivet Signed-off-by: Namjae Jeon --- fs/smb/server/mgmt/user_session.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/smb/server/mgmt/user_session.c b/fs/smb/server/mgmt/user_session.c index f99c86284ba3..eaa044da3280 100644 --- a/fs/smb/server/mgmt/user_session.c +++ b/fs/smb/server/mgmt/user_session.c @@ -308,6 +308,9 @@ static int __rpc_method(char *rpc_name) if (!strcmp(rpc_name, "\\lsarpc") || !strcmp(rpc_name, "lsarpc")) return KSMBD_RPC_LSARPC_METHOD_INVOKE; + if (!strcmp(rpc_name, "\\mdssvc") || !strcmp(rpc_name, "mdssvc")) + return 0; /* mdssvc unsupported: quiet, expected macOS probe */ + pr_err("Unsupported RPC: %s\n", rpc_name); return 0; }