[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAH2r5mtAYV925FbL-5GPGvk3wMG5u0027_icNtUw6uZ9yOBqyw@mail.gmail.com>
Date: Tue, 27 May 2025 22:39:37 -0500
From: Steve French <smfrench@...il.com>
To: chenxiaosong@...nxiaosong.com, Kuniyuki Iwashima <kuniyu@...zon.com>
Cc: pc@...guebit.com, ronniesahlberg@...il.com, sprasad@...rosoft.com,
tom@...pey.com, bharathsm@...rosoft.com, linux-cifs@...r.kernel.org,
linux-kernel@...r.kernel.org, ChenXiaoSong <chenxiaosong@...inos.cn>,
David Laight <david.laight.linux@...il.com>, Wang Zhaolong <wangzhaolong1@...wei.com>,
Enzo Matsumiya <ematsumiya@...e.de>
Subject: Re: [PATCH] smb/client: use sock_create_kern() in generic_ip_connect()
Weren't there issues brought up earlier with using sock_create_kern
due to network namespaces and refcounts?
On Tue, May 27, 2025 at 10:18 PM <chenxiaosong@...nxiaosong.com> wrote:
>
> From: ChenXiaoSong <chenxiaosong@...inos.cn>
>
> Change __sock_create() to sock_create_kern() for explicitness.
>
> Signed-off-by: ChenXiaoSong <chenxiaosong@...inos.cn>
> ---
> fs/smb/client/connect.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/smb/client/connect.c b/fs/smb/client/connect.c
> index 6bf04d9a5491..3275f2ff84cb 100644
> --- a/fs/smb/client/connect.c
> +++ b/fs/smb/client/connect.c
> @@ -3350,8 +3350,7 @@ generic_ip_connect(struct TCP_Server_Info *server)
> struct net *net = cifs_net_ns(server);
> struct sock *sk;
>
> - rc = __sock_create(net, sfamily, SOCK_STREAM,
> - IPPROTO_TCP, &server->ssocket, 1);
> + rc = sock_create_kern(net, sfamily, SOCK_STREAM, IPPROTO_TCP, &server->ssocket);
> if (rc < 0) {
> cifs_server_dbg(VFS, "Error %d creating socket\n", rc);
> return rc;
> --
> 2.34.1
>
>
--
Thanks,
Steve
Powered by blists - more mailing lists