Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2453453imd; Fri, 2 Nov 2018 11:39:57 -0700 (PDT) X-Google-Smtp-Source: AJdET5cZ5yhctf1LQHJSc+X5tNtr7bw6ddwYztgPTigHx1p0ZxdIU4N3n21xs3sRfZO03CinkmN3 X-Received: by 2002:a17:902:b7c5:: with SMTP id v5-v6mr1245346plz.40.1541183997492; Fri, 02 Nov 2018 11:39:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541183997; cv=none; d=google.com; s=arc-20160816; b=d8Zr2kbCa5Xdsd9uzMkZU1Cav7uNknp/Svd+QAwUaWtdszg9V+w178F0+XjciBWE74 PBcVOc9JPCpOOwbyyK/AhaXnG6MTXiO73MCneaXF9xQSuhD+w2n9sbV8v91Z890HqbhR B6V69EDUaV/foxaLITLKXLbnR5bhgAIVqt9/HfSd82rJQmJ1Ib3FHCS6TISutl9kZsco 1pqL3HgYlJKEJu1+URxiudgzVa7Z/kTMpXEZIZkJOPvj3jpPNZI9KCO6EqS3rNEjvggS bN+g4OokD2q0FCw+unNdxxj8YnJX97MqWHZ/eRGV1nsJViLHnI8II8x7Pu5DaHfSv03W G2lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=VWaD3IhX/E4XBbOQXz3ShRSUuxCc0QmljZZQ+IB6ceI=; b=U5MgZ6RJsnlN0eb3UywtoDwbSda4QJkDVCgCTPYx9cYTtn5SQQAkosLfu+61Q+TfrD wy60kcWvRTO6S8EirEQ9MDGHCZAgZAGbyDw2NF5FVeTpHnwh4NBjc2VgRcMJ3eWIVndQ dRtMTm0CPGt2hwzMQS0GLlVRy/neugJ0tPlhqT0Kmpuu8EBeQRcDggM/BpHKuro03rzx 2FprKQX/l7WYw2hIEj3oSyUpGASNnykb1aoqibNeQY0epJpPNVojkbGDJ9t0tW/V6b5J QxDu8R4C/oz+mih3F7ft4OGXuWVX4fdOhPHuWFWW/KZtpLbm6c8LB7KTkM/spH/YcwO2 O+Wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0bzS+a9j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b13-v6si4219565plm.316.2018.11.02.11.39.42; Fri, 02 Nov 2018 11:39:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0bzS+a9j; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728870AbeKCDqk (ORCPT + 99 others); Fri, 2 Nov 2018 23:46:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:40494 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728140AbeKCDqj (ORCPT ); Fri, 2 Nov 2018 23:46:39 -0400 Received: from localhost (5356596B.cm-6-7b.dynamic.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 CE3A92081B; Fri, 2 Nov 2018 18:38:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541183908; bh=WIqTJZlZJ1MhuQrEmxhs6s+VlNxI88Csb+at8SXRwBM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0bzS+a9j5fWd+pJcTG3FvFHLcJkWDLAo7P4ulbyzX8J9LyQoNW8F5g148OI+H10tq uYFQid7UxRYWHbPP6dnkoDCVmjmgF1a3jApXPUxKpqpcJPRYMen99Wth/cwQy6Jz5/ muI2C/hAkcCnNrh9v7IBJwF23AErCY6rJTRU/7ls= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, zhong jiang , Florian Westphal , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 4.18 017/150] netfilter: conntrack: get rid of double sizeof Date: Fri, 2 Nov 2018 19:32:59 +0100 Message-Id: <20181102182904.063832148@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102182902.250560510@linuxfoundation.org> References: <20181102182902.250560510@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 346fa83d10934cf206e2fd0f514bf8ce186f08fe ] sizeof(sizeof()) is quite strange and does not seem to be what is wanted here. The issue is detected with the help of Coccinelle. Fixes: 39215846740a ("netfilter: conntrack: remove nlattr_size pointer from l4proto trackers") Signed-off-by: zhong jiang Acked-by: Florian Westphal Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- net/netfilter/nf_conntrack_proto_tcp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c index 8e67910185a0..1004fb5930de 100644 --- a/net/netfilter/nf_conntrack_proto_tcp.c +++ b/net/netfilter/nf_conntrack_proto_tcp.c @@ -1239,8 +1239,8 @@ static const struct nla_policy tcp_nla_policy[CTA_PROTOINFO_TCP_MAX+1] = { #define TCP_NLATTR_SIZE ( \ NLA_ALIGN(NLA_HDRLEN + 1) + \ NLA_ALIGN(NLA_HDRLEN + 1) + \ - NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags))) + \ - NLA_ALIGN(NLA_HDRLEN + sizeof(sizeof(struct nf_ct_tcp_flags)))) + NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags)) + \ + NLA_ALIGN(NLA_HDRLEN + sizeof(struct nf_ct_tcp_flags))) static int nlattr_to_tcp(struct nlattr *cda[], struct nf_conn *ct) { -- 2.17.1