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=-10.0 required=3.0 tests=BAYES_00,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 DB135C433E1 for ; Thu, 30 Jul 2020 08:08:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADB662083B for ; Thu, 30 Jul 2020 08:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596096485; bh=Hg43xg5T/x8Z2lC1HlJ6BZpLECdlxTMQ8JMR1HJDtD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=k23/8mQJe1Vv0ngYjN0XiB9VLuZgMURzDcTMeZHtgmqjEVUrYvOFF/PPtucBWoTWV mbfYC6EyYao4ntkLWjUQb00+9OL6kUEpx55qxaBUrMDRacLJdT3NX10nAUuLiq6Nlj Yr4pb9k2HdEsHtUpR/F66p+PEXjhoj1oc/+uDadE= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729149AbgG3IIF (ORCPT ); Thu, 30 Jul 2020 04:08:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:46182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729539AbgG3IID (ORCPT ); Thu, 30 Jul 2020 04:08:03 -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 D97312074B; Thu, 30 Jul 2020 08:08:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596096482; bh=Hg43xg5T/x8Z2lC1HlJ6BZpLECdlxTMQ8JMR1HJDtD0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kLSrItuHI4XzDpPKMcaqjEnx026N3zxZqkX21bin7u1tXn4pIDgISAY3kFCwR7FDC 37T5TKNEC2Z3EzsJB76TWGcEiwJk8oyQnKy9YKJ4V1MAAf2ITc2KhsV+WjPNWKVOH1 Jnd54Pmi+xo4GQ/frZRB7yy+RfUXJV8prBDeN4uY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaohe Lin , "David S. Miller" Subject: [PATCH 4.14 06/14] net: udp: Fix wrong clean up for IS_UDPLITE macro Date: Thu, 30 Jul 2020 10:04:49 +0200 Message-Id: <20200730074419.205288671@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200730074418.882736401@linuxfoundation.org> References: <20200730074418.882736401@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: Miaohe Lin [ Upstream commit b0a422772fec29811e293c7c0e6f991c0fd9241d ] We can't use IS_UDPLITE to replace udp_sk->pcflag when UDPLITE_RECV_CC is checked. Fixes: b2bf1e2659b1 ("[UDP]: Clean up for IS_UDPLITE macro") Signed-off-by: Miaohe Lin Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/ipv4/udp.c | 2 +- net/ipv6/udp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c @@ -1894,7 +1894,7 @@ static int udp_queue_rcv_skb(struct sock /* * UDP-Lite specific tests, ignored on UDP sockets */ - if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) { + if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) { /* * MIB statistics other than incrementing the error count are --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -629,7 +629,7 @@ static int udpv6_queue_rcv_skb(struct so /* * UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c). */ - if ((is_udplite & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) { + if ((up->pcflag & UDPLITE_RECV_CC) && UDP_SKB_CB(skb)->partial_cov) { if (up->pcrlen == 0) { /* full coverage was set */ net_dbg_ratelimited("UDPLITE6: partial coverage %d while full coverage %d requested\n",