aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthieu Baerts <matthieu.baerts@tessares.net>2021-06-25 14:25:22 -0700
committerDavid S. Miller <davem@davemloft.net>2021-06-28 13:04:06 -0700
commitc4512c63b1193c73b3f09c598a6d0a7f88da1dd8 (patch)
tree40a9dcb2b65b79b400e2c01e536a55ed86f04804 /net
parentMerge branch 'reset-mac' (diff)
downloadlinux-dev-c4512c63b1193c73b3f09c598a6d0a7f88da1dd8.tar.xz
linux-dev-c4512c63b1193c73b3f09c598a6d0a7f88da1dd8.zip
mptcp: fix 'masking a bool' warning
Dan Carpenter reported an issue introduced in commit fde56eea01f9 ("mptcp: refine mptcp_cleanup_rbuf") where a new boolean (ack_pending) is masked with 0x9. This is not the intention to ignore values by using a boolean. This variable should not have a 'bool' type: we should keep the 'u8' to allow this comparison. Fixes: fde56eea01f9 ("mptcp: refine mptcp_cleanup_rbuf") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Acked-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/mptcp/protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index ce0c45dfb79e..7bb82424e551 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -455,7 +455,7 @@ static void mptcp_subflow_cleanup_rbuf(struct sock *ssk)
static bool mptcp_subflow_could_cleanup(const struct sock *ssk, bool rx_empty)
{
const struct inet_connection_sock *icsk = inet_csk(ssk);
- bool ack_pending = READ_ONCE(icsk->icsk_ack.pending);
+ u8 ack_pending = READ_ONCE(icsk->icsk_ack.pending);
const struct tcp_sock *tp = tcp_sk(ssk);
return (ack_pending & ICSK_ACK_SCHED) &&