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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43B26C4332F for ; Mon, 28 Nov 2022 01:31:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229700AbiK1BbB (ORCPT ); Sun, 27 Nov 2022 20:31:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229475AbiK1Ba7 (ORCPT ); Sun, 27 Nov 2022 20:30:59 -0500 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AB5DA440 for ; Sun, 27 Nov 2022 17:30:58 -0800 (PST) Received: by mail-pg1-x535.google.com with SMTP id h33so3663175pgm.9 for ; Sun, 27 Nov 2022 17:30:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ivan-computer.20210112.gappssmtp.com; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=eHIyETS1lGz31szWszpuBGcrsTyrBOqWhdPJ/l2FVS4=; b=1JJpTxD0a8aytT36HRDIfBru8y7OZTgRm7PdgOY6gy6PD9GHFELU72jGFjGO6J8/kw WhlyYzlRl6m64T6QyYofo+twwOtHP81UTpLgy75ULc24232lclKbTKSJD9HmgGOPQc63 LmsM6Vdr52hNYo/fa8YKM+iiawOkUb3XBjY6OhYUUqpHIc+apRKCuy//mUV8EVdPEHvX qLsU6rezwssHrptLb12nUWOdXxSY6T+Cv8q200y+CE760/d6KIJwDSHaCPUQxLYXNkog 5LaxLPIqZNfXJlQmG9GCGhFTWCLF4JUOdqC5SaAKbMR5JCXeCzPk4DjAKljJ0q6zME7k 5gJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=eHIyETS1lGz31szWszpuBGcrsTyrBOqWhdPJ/l2FVS4=; b=DJxdRX9oJ38O6bWIQISDlA4HcMnkvLkR6hbgll31fL/JayFc3BQVyArgzya4LYvFZy kdI5bPlckPXFz9KI81ndU2+nojkpO5YZUKHxWG8PqaWPMVreMaJPDEk1yp+kQBjoljQu FjgaQIB0+7ZmHtVbHu7H6b7/JQzwWBZ8g3NUlxXjZSYkzrnsHtSbtlXoh9wil9CT964K JqJboShdqmoBd9smlXShX0iYwphr33hjr3DBrXqC097BqBcB875SB32X0FJhFWcxRE41 PPTzRIga9qGMnMe77c2EEMAq+BdpLsN5sdKWl8lhQ/127Owck2T4JNbyCPUCWJQoczaS 2xGw== X-Gm-Message-State: ANoB5plQUxIIlsil8eIOqfXvpXNpyC8aIUwV0begDg29fXZMn1yjoLUZ UxY9/iYlVkN+SR06U3MzcsZl4ZIaNVDYxKkIK0o/2gN/C0I+dQ== X-Google-Smtp-Source: AA0mqf6/JW8PVKHVn7ofjb3WyFOOg3d21aAJavoE3qpWPyW9xVpOJBxXwPoo2t3hWlFKdWazS4gNx67OkGhaUYPhN2o= X-Received: by 2002:a62:ea0e:0:b0:575:7bb:d6fc with SMTP id t14-20020a62ea0e000000b0057507bbd6fcmr6245800pfh.79.1669599057711; Sun, 27 Nov 2022 17:30:57 -0800 (PST) MIME-Version: 1.0 From: Ivan Babrou Date: Sun, 27 Nov 2022 17:30:47 -0800 Message-ID: Subject: Unused variable 'mark' in v6.1-rc7 To: Daniel Xu Cc: Pablo Neira Ayuso , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There's 52d1aa8b8249 in v6.1-rc7: * netfilter: conntrack: Fix data-races around ct mark It triggers an error: #19 355.8 /build/linux-source/net/netfilter/nf_conntrack_netlink.c: In function '__ctnetlink_glue_build': #19 355.8 /build/linux-source/net/netfilter/nf_conntrack_netlink.c:2674:13: error: unused variable 'mark' [-Werror=unused-variable] #19 355.8 2674 | u32 mark; #19 355.8 | ^~~~ #19 355.8 cc1: all warnings being treated as errors If CONFIG_NF_CONNTRACK_MARK is not enabled, as mark is declared unconditionally, but used under ifdef: #ifdef CONFIG_NF_CONNTRACK_MARK - if ((events & (1 << IPCT_MARK) || ct->mark) - && ctnetlink_dump_mark(skb, ct) < 0) + mark = READ_ONCE(ct->mark); + if ((events & (1 << IPCT_MARK) || mark) && + ctnetlink_dump_mark(skb, mark) < 0) goto nla_put_failure; #endif To have NF_CONNTRACK_MARK one needs NETFILTER_ADVANCED: config NF_CONNTRACK_MARK bool 'Connection mark tracking support' depends on NETFILTER_ADVANCED It's supposed to be enabled by default: config NETFILTER_ADVANCED bool "Advanced netfilter configuration" depends on NETFILTER default y But it's not in defconfig (it's missing from arm64 completely): $ rg NETFILTER_ADVANCED arch/x86/configs/x86_64_defconfig 93:# CONFIG_NETFILTER_ADVANCED is not set I think the solution is to enclose mark definition into ifdef as well and I'm happy to send a patch if you agree and would like me to.