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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 B55ABC47247 for ; Fri, 8 May 2020 13:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 75587206B8 for ; Fri, 8 May 2020 13:16:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588943799; bh=RcBs7OXOISL3/zxdhrJ/BCk5YFJhN/ifvMWPZ3AI0WU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=KAiXVnxTILLwUZVWi12O3komNFJ5unryLdOII9pw5G27LbT3NeDGK3jF92KK7vB6J GKF/PHEtADwRQp8hGEvniQC4YLw4+OyzeRfhaH+I0+p7ZgCD2ua4lIFClkQui5zIpa wVtc7NRPMf0/XyRS/dGqtDIfRqzrYvkeUkQ7EfsU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729053AbgEHNQi (ORCPT ); Fri, 8 May 2020 09:16:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:43950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729247AbgEHMo5 (ORCPT ); Fri, 8 May 2020 08:44:57 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F20282145D; Fri, 8 May 2020 12:44:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588941897; bh=RcBs7OXOISL3/zxdhrJ/BCk5YFJhN/ifvMWPZ3AI0WU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RMBvHif1T1+m/Y1HxZYx0SxwzuHU93rf0cFIAMFANG69XZgqoS7PT4j0/nBmVh3vW MJa0+bG4VdLjqW6IVnweMVqlg6LobaQgfFxxU3U9glev4i8tRP47cWzwvVnvE7Cxy2 ZXdV5HlierlxBqokbYcCG8gbJMk4GsJhqq3P8+CU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Cong Wang , Tom Herbert , Hannes Frederic Sowa , "David S. Miller" Subject: [PATCH 4.4 189/312] ipv4: fix checksum annotation in udp4_csum_init Date: Fri, 8 May 2020 14:33:00 +0200 Message-Id: <20200508123137.760014097@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200508123124.574959822@linuxfoundation.org> References: <20200508123124.574959822@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hannes Frederic Sowa commit b46d9f625b07f843c706c2c7d0210a90ccdf143b upstream. Reported-by: Cong Wang Cc: Cong Wang Cc: Tom Herbert Fixes: 4068579e1e098fa ("net: Implmement RFC 6936 (zero RX csums for UDP/IPv6") Signed-off-by: Hannes Frederic Sowa Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/udp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1754,8 +1754,11 @@ static inline int udp4_csum_init(struct } } - return skb_checksum_init_zero_check(skb, proto, uh->check, - inet_compute_pseudo); + /* Note, we are only interested in != 0 or == 0, thus the + * force to int. + */ + return (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, + inet_compute_pseudo); } /*