From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 567E8C432BE for ; Mon, 26 Jul 2021 16:16:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 420BB60F6B for ; Mon, 26 Jul 2021 16:16:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237048AbhGZPgH (ORCPT ); Mon, 26 Jul 2021 11:36:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:53658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232521AbhGZPfm (ORCPT ); Mon, 26 Jul 2021 11:35:42 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8E0156056B; Mon, 26 Jul 2021 16:16:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1627316170; bh=uNnboFeGRHzhsbMnsKDoReIh4z875Ruuq0ZcNc7DW+4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AxvFdEDILZVSRZ/IL7NQOIqgslTNgPBkKkLiQOUnQU/5PzbAb+4ScdHj85X0AwHR0 710MZg//jytngq918f/MjZ5KQeGhEJsIpDx9biMZwT3/PZPw5Ne2RshA35g3h7LEUG Az53G5R36fL1qmFm1Yf8PnJIh4JjOianUaJ1nGLc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dan Carpenter , Matthieu Baerts , Mat Martineau , Paolo Abeni , "David S. Miller" Subject: [PATCH 5.13 215/223] mptcp: fix masking a bool warning Date: Mon, 26 Jul 2021 17:40:07 +0200 Message-Id: <20210726153853.215833533@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210726153846.245305071@linuxfoundation.org> References: <20210726153846.245305071@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Matthieu Baerts commit c4512c63b1193c73b3f09c598a6d0a7f88da1dd8 upstream. 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 Signed-off-by: Matthieu Baerts Signed-off-by: Mat Martineau Acked-by: Paolo Abeni Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/mptcp/protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/mptcp/protocol.c +++ b/net/mptcp/protocol.c @@ -446,7 +446,7 @@ static void mptcp_subflow_cleanup_rbuf(s 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) &&