All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@linux-m68k.org>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH net-next] tcp: fix signed/unsigned comparison
Date: Sun, 17 Apr 2022 20:24:20 +0200	[thread overview]
Message-ID: <87czhfy3e3.fsf@igel.home> (raw)
In-Reply-To: <20220417171027.3888810-1-eric.dumazet@gmail.com> (Eric Dumazet's message of "Sun, 17 Apr 2022 10:10:27 -0700")

On Apr 17 2022, Eric Dumazet wrote:

> diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
> index cf2dc19bb8c766c1d33406053fd61c0873f15489..0d88984e071531fb727bdee178b0c01fd087fe5f 100644
> --- a/net/ipv4/tcp_input.c
> +++ b/net/ipv4/tcp_input.c
> @@ -5959,7 +5959,7 @@ void tcp_rcv_established(struct sock *sk, struct sk_buff *skb)
>  
>  step5:
>  	reason = tcp_ack(sk, skb, FLAG_SLOWPATH | FLAG_UPDATE_TS_RECENT);
> -	if (reason < 0)
> +	if ((int)reason < 0)
>  		goto discard;
>  
>  	tcp_rcv_rtt_measure_ts(sk, skb);

Shouldn't reason be negated before passing it to tcp_drop_reason?

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2022-04-17 18:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-17 17:10 [PATCH net-next] tcp: fix signed/unsigned comparison Eric Dumazet
2022-04-17 18:24 ` Andreas Schwab [this message]
2022-04-17 18:28   ` Eric Dumazet

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=87czhfy3e3.fsf@igel.home \
    --to=schwab@linux-m68k.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kuba@kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.