Re: [PATCH net-next 2/2] tcp/dccp: Remove unnecessary initialization of refcounted.

Eric Dumazet <[email protected]>
Newsgroups org.kernel.vger.dccp,org.kernel.vger.netdev
Message-ID <CANn89iLfqRCgsng=ZVxjU_WxL6kiymmicQ7Jn=K8pU0D9HNwEg@mail.gmail.com>
On Mon, Mar 23, 2020 at 11:22 AM Kuniyuki Iwashima <[email protected]> wrote:
>
> When we get a TCP_NEW_SYN_RECV/DCCP_NEW_SYN_RECV socket by
> __inet_lookup_skb(), refcounted is already set true, so it is not
> necessary to do it again.

This changelog is absolutely not accurate.

sk is a listener here.
(because sk was set to req->rsk_listener;)

Please do not add confusion by mixing different things.

I prefer not relying on the old value of 'refcounted', since we
switched sk value.

Note that we call reqsk_put(req); regardless of 'refcounted'

I would rather not change this code and make future backports more complicated.

Thanks.
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.