Linux CIFS filesystem development
 help / color / mirror / Atom feed
From: Wang Zhaolong <wangzhaolong1@huawei.com>
To: Kuniyuki Iwashima <kuniyu@amazon.com>, Steve French <sfrench@samba.org>
Cc: Paulo Alcantara <pc@manguebit.com>,
	Ronnie Sahlberg <ronniesahlberg@gmail.com>,
	Shyam Prasad N <sprasad@microsoft.com>,
	Tom Talpey <tom@talpey.com>, Bharath SM <bharathsm@microsoft.com>,
	Enzo Matsumiya <ematsumiya@suse.de>,
	Kuniyuki Iwashima <kuni1840@gmail.com>,
	<linux-cifs@vger.kernel.org>, <samba-technical@lists.samba.org>
Subject: Re: [PATCH 1/2] Revert "smb: client: Fix netns refcount imbalance causing leaks and use-after-free"
Date: Thu, 3 Apr 2025 17:59:20 +0800	[thread overview]
Message-ID: <1e95b93f-7632-441a-a4ba-aecd7e640383@huawei.com> (raw)
In-Reply-To: <20250402200319.2834-2-kuniyu@amazon.com>

Hi Kuniyuki,

When testing this patch on the latest mainline, I found that the following
snippet has a conflict:


> @@ -3444,6 +3441,9 @@ generic_ip_connect(struct TCP_Server_Info *server)
>   	    (server->rfc1001_sessinit == -1 && sport == htons(RFC1001_PORT)))
>   		rc = ip_rfc1001_connect(server);
>   
> +	if (rc < 0)
> +		put_net(cifs_net_ns(server));
> +
>   	return rc;
>   }
>   

Specifically, it is this line:

>   	    (server->rfc1001_sessinit == -1 && sport == htons(RFC1001_PORT)))

In my code, it corresponds to the following snippet:

```
@@ -3333,10 +3330,13 @@ generic_ip_connect(struct TCP_Server_Info *server)
  	}
  	trace_smb3_connect_done(server->hostname, server->conn_id, &server->dstaddr);
  	if (sport == htons(RFC1001_PORT))
  		rc = ip_rfc1001_connect(server);
  
+	if (rc < 0)
+		put_net(cifs_net_ns(server));
+
  	return rc;
  }
```

Looks like V3 needs to be sent?

Best regards,
Wang Zhaolong


  parent reply	other threads:[~2025-04-03  9:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 20:02 [PATCH 0/2] cifs: Revert bogus fix for CVE-2024-54680 and its followup commit Kuniyuki Iwashima
2025-04-02 20:02 ` [PATCH 1/2] Revert "smb: client: Fix netns refcount imbalance causing leaks and use-after-free" Kuniyuki Iwashima
2025-04-03  3:16   ` Wang Zhaolong
2025-04-03  9:59   ` Wang Zhaolong [this message]
2025-04-03 17:26     ` Kuniyuki Iwashima
2025-04-03 17:32       ` Steve French
2025-04-03 17:46         ` Kuniyuki Iwashima
2025-04-02 20:02 ` [PATCH 2/2] Revert "smb: client: fix TCP timers deadlock after rmmod" Kuniyuki Iwashima
2025-04-03  3:12   ` Wang Zhaolong
2025-04-03  1:14 ` [PATCH 0/2] cifs: Revert bogus fix for CVE-2024-54680 and its followup commit Steve French
2025-04-03  2:18   ` Kuniyuki Iwashima
2025-04-03  3:19     ` Steve French
2025-04-03 10:14       ` Wang Zhaolong
2025-04-11  7:04       ` Kuniyuki Iwashima
2025-04-12 17:28         ` Steve French
2025-04-12 19:10           ` Kuniyuki Iwashima

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e95b93f-7632-441a-a4ba-aecd7e640383@huawei.com \
    --to=wangzhaolong1@huawei.com \
    --cc=bharathsm@microsoft.com \
    --cc=ematsumiya@suse.de \
    --cc=kuni1840@gmail.com \
    --cc=kuniyu@amazon.com \
    --cc=linux-cifs@vger.kernel.org \
    --cc=pc@manguebit.com \
    --cc=ronniesahlberg@gmail.com \
    --cc=samba-technical@lists.samba.org \
    --cc=sfrench@samba.org \
    --cc=sprasad@microsoft.com \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox