Re: [PATCH 3/3] smb/server: check create_proc_shares() failure

Namjae Jeon <[email protected]>
Newsgroups org.kernel.vger.linux-cifs
Message-ID <CAKYAXd9-mkdArzM573FPUo0cS8ZuuY21OgMMQ5d9kLOknzy26w@mail.gmail.com>
> diff --git a/fs/smb/server/server.c b/fs/smb/server/server.c
> index 14431adce9b8..3c318f529927 100644
> --- a/fs/smb/server/server.c
> +++ b/fs/smb/server/server.c
> @@ -627,7 +627,9 @@ static int __init ksmbd_server_init(void)
>         if (ret)
>                 goto err_proc_cleanup;
>
> -       create_proc_shares();
> +       ret = create_proc_shares();
> +       if (ret)
> +               goto err_proc_cleanup;
create_proc_sessions() and create_proc_shares() only create optional
procfs monitoring entries. SMB request processing does not depend on
these entries, so a failure should only make the corresponding
monitoring file unavailable.  Do you think we should abort ksmbd
initialization when create_proc_sessions() or create_proc_shares()
fail ?
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.