Re: [PATCH 2/8] ksmbd: quiet mdssvc RPC log spam in create_smb2_pipe

Namjae Jeon <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <CAKYAXd-7eVwMcmE14Wv45UQ_-q+k_Xzn8mEpd41CwcBmOE5-Cw@mail.gmail.com>
> diff --git a/fs/smb/server/smb2pdu.c b/fs/smb/server/smb2pdu.c
> index 81f4af614..2e87139d0 100644
> --- a/fs/smb/server/smb2pdu.c
> +++ b/fs/smb/server/smb2pdu.c
> @@ -2656,7 +2656,16 @@ static noinline int create_smb2_pipe(struct ksmbd_work *work)
>
>         id = ksmbd_session_rpc_open(work->sess, name);
>         if (id < 0) {
> -               pr_err("Unable to open RPC pipe: %d\n", id);
> +               /*
> +                * mdssvc (Spotlight) is a routine, expected probe from macOS
> +                * that we deliberately don't support -- it's disabled at the
> +                * __rpc_method() level (mgmt/user_session.c), but this
> +                * generic failure log would otherwise still fire on every
> +                * single probe regardless.
> +                */
> +               if (!(id == -EINVAL && (!strcmp(name, "\\mdssvc") ||
I think this patch may not have been tested against the latest
ksmbd-for-next-next tree.
In the current ksmbd-for-next-next code, the mdssvc path returns
-ENOENT (not -EINVAL), so the check added in this patch should be
updated from -EINVAL to -ENOENT.

> +                                       !strcmp(name, "mdssvc"))))
> +                       pr_err("Unable to open RPC pipe: %d\n", id);
>                 err = id;
>                 goto out;
>         }
> --
> 2.43.0
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.