All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: pabeni@redhat.com
Cc: mptcp@lists.linux.dev
Subject: [bug report] mptcp: refine mptcp_cleanup_rbuf
Date: Fri, 25 Jun 2021 11:26:22 +0300	[thread overview]
Message-ID: <YNWTLmF3Cne09pTT@mwanda> (raw)

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

             reply	other threads:[~2021-06-25  8:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  8:26 Dan Carpenter [this message]
2021-06-25  8:47 ` [bug report] mptcp: refine mptcp_cleanup_rbuf Matthieu Baerts
2021-06-25 10:33   ` Paolo Abeni

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=YNWTLmF3Cne09pTT@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=mptcp@lists.linux.dev \
    --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.