[PATCH 1/2] Revert "smb: client: Fix netns refcount imbalance causing leaks and use-after-free"

Steve French smfrench at gmail.com
Thu Apr 3 17:32:35 UTC 2025


> What branch should be used to send reverts for -rcX ?

cifs-2.6.git for-next

But probably won't be an issue in a few days (since mainline then will
likely include the conflicting patch - which fortunately is unrelated
to this discussion, just fixes an RFC1001 bug)

On Thu, Apr 3, 2025 at 12:27 PM Kuniyuki Iwashima <kuniyu at amazon.com> wrote:
>
> From: Wang Zhaolong <wangzhaolong1 at huawei.com>
> Date: Thu, 3 Apr 2025 17:59:20 +0800
> > Hi Kuniyuki,
> >
> > When testing this patch on the latest mainline, I found that the following
> > snippet has a conflict:
>
> I guess it's because I used for-next branch of the cifs.git.
>
> Steve:
>
> What branch should be used to send reverts for -rcX ?
>
>
> >
> >
> > > @@ -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
>


-- 
Thanks,

Steve



More information about the samba-technical mailing list