mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [bug report] mptcp: refine mptcp_cleanup_rbuf
@ 2021-06-25  8:26 Dan Carpenter
  2021-06-25  8:47 ` Matthieu Baerts
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2021-06-25  8:26 UTC (permalink / raw)
  To: pabeni; +Cc: mptcp

Hello Paolo Abeni,

The patch fde56eea01f9: "mptcp: refine mptcp_cleanup_rbuf" from Jun
22, 2021, leads to the following static checker warning:

	net/mptcp/protocol.c:464 mptcp_subflow_could_cleanup()
	warn: masking a bool

net/mptcp/protocol.c
   455  static bool mptcp_subflow_could_cleanup(const struct sock *ssk, bool rx_empty)
   456  {
   457          const struct inet_connection_sock *icsk = inet_csk(ssk);
   458          bool ack_pending = READ_ONCE(icsk->icsk_ack.pending);
                ^^^^^^^^^^^^^^^^

   459          const struct tcp_sock *tp = tcp_sk(ssk);
   460  
   461          return (ack_pending & ICSK_ACK_SCHED) &&
                                      ^^^^^^^^^^^^^^
This is 1 so it works

   462                  ((READ_ONCE(tp->rcv_nxt) - READ_ONCE(tp->rcv_wup) >
   463                    READ_ONCE(icsk->icsk_ack.rcv_mss)) ||
   464                   (rx_empty && ack_pending &
   465                                (ICSK_ACK_PUSHED2 | ICSK_ACK_PUSHED)));
                                       ^^^^^^^^^^^^^^^^
This is 8 so it doesn't work

   466  }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-25 10:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-25  8:26 [bug report] mptcp: refine mptcp_cleanup_rbuf Dan Carpenter
2021-06-25  8:47 ` Matthieu Baerts
2021-06-25 10:33   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).