tcp: fix signed/unsigned comparison
Kernel test robot reported: smatch warnings: net/ipv4/tcp_input.c:5966 tcp_rcv_established() warn: unsigned 'reason' is never less than zero. I actually had one packetdrill failing because of this bug, and was about to send the fix :) v2: Andreas Schwab also pointed out that @reason needs to be negated before we reach tcp_drop_reason() Fixes: 4b506af9 ("tcp: add two drop reasons for tcp_ack()") Signed-off-by: NEric Dumazet <edumazet@google.com> Reported-by: Nkernel test robot <lkp@intel.com> Reported-by: NAndreas Schwab <schwab@linux-m68k.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录