Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4827551pxy; Tue, 27 Apr 2021 13:39:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytXD4JahO0ISI0U+InwXVKL4c51QqNiaMGaKEhVrIB7Lx0K+J7G4l9oRCODK3Wd2URN4Mm X-Received: by 2002:a17:902:e788:b029:eb:2c5b:bce8 with SMTP id cp8-20020a170902e788b02900eb2c5bbce8mr26522474plb.41.1619555971494; Tue, 27 Apr 2021 13:39:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619555971; cv=none; d=google.com; s=arc-20160816; b=P74rSy/qtSTsXlCmtCO3tpfmuoRLBWqlnuPURHjACgoXiuEXuthZ1oF55yTFhDa4DY AHvlxnMyvTKnTzBsaZo+8+lbsKXfK3uWubE1n26UvZjNBLUobE45ItR0vfrlpAsxSEhN NdYCOwHZAg9jh2tdScUU/ia7bvG/J5A914t7LQRLGwstRFR8Xzb/1aW1zfEkDHxRsrLB mCAhUkunwIjv8XQfYtSaHlrfpuyxebquH0YdOBtFuFFeB2J7VtcDxVpWMsdJsh7hQOdX xrUviT8A1nPsR1+RlLZBj5tilULBMo7OIxx+MeFpI9XHoJK8xIEgG9ZKdfXeKoMcwjb/ i7nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cBsaVWcxtqIxBcPTHweLlgfqex6LkCxd3BmYB1WGt/Y=; b=d6A2nVnd8xGrRPWY1h9XQGiTo2y9SJrKNysTH+1LTJEP1Y6oWi2KbVRdyZO2MMiYf4 nbIjHkySJDvY4+Y/NrqL43uLkdHj9FkzMyzEeecGAkESyAj/fo2F9X8tC5SxW8s+xW1y euPzhtFfvfn23cMzYzU0sUpXlbT9tppRt+1TRDKO3E3cuKUUTfE+Y5YZBCmnRSzeBMWO GCsX/tUMpxQz219VcWP3eCin0C24mdqui7aoyAUsb7o2dEuLzQtQdB0l+xhPQh9enraV S5z+bl8V9JF1toFx8/LW6U6G3G9eTKTiJGF9qRfYbl892YWTV0bqQ0YDWudxL7+IfvlI aeQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b15si958738plh.54.2021.04.27.13.39.17; Tue, 27 Apr 2021 13:39:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238980AbhD0UhI (ORCPT + 99 others); Tue, 27 Apr 2021 16:37:08 -0400 Received: from mail.netfilter.org ([217.70.188.207]:54236 "EHLO mail.netfilter.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235803AbhD0UhH (ORCPT ); Tue, 27 Apr 2021 16:37:07 -0400 Received: from us.es (unknown [90.77.255.23]) by mail.netfilter.org (Postfix) with ESMTPSA id BF12363E85; Tue, 27 Apr 2021 22:35:45 +0200 (CEST) Date: Tue, 27 Apr 2021 22:36:20 +0200 From: Pablo Neira Ayuso To: Arnd Bergmann Cc: Jozsef Kadlecsik , Florian Westphal , "David S. Miller" , Jakub Kicinski , Arnd Bergmann , Balazs Scheidler , netfilter-devel@vger.kernel.org, coreteam@netfilter.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] netfilter: nft_socket: fix build with CONFIG_SOCK_CGROUP_DATA=n Message-ID: <20210427203620.GB14154@salvia> References: <20210427194528.2325108-1-arnd@kernel.org> <20210427194528.2325108-2-arnd@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210427194528.2325108-2-arnd@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 27, 2021 at 09:45:19PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > In some configurations, the sock_cgroup_ptr() function is not available: > > net/netfilter/nft_socket.c: In function 'nft_sock_get_eval_cgroupv2': > net/netfilter/nft_socket.c:47:16: error: implicit declaration of function 'sock_cgroup_ptr'; did you mean 'obj_cgroup_put'? [-Werror=implicit-function-declaration] > 47 | cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); > | ^~~~~~~~~~~~~~~ > | obj_cgroup_put > net/netfilter/nft_socket.c:47:14: error: assignment to 'struct cgroup *' from 'int' makes pointer from integer without a cast [-Werror=int-conversion] > 47 | cgrp = sock_cgroup_ptr(&sk->sk_cgrp_data); > | ^ > > Change the caller to match the same #ifdef check, only calling it > when the function is defined. > > Fixes: e0bb96db96f8 ("netfilter: nft_socket: add support for cgroupsv2") > Signed-off-by: Arnd Bergmann > --- > I don't actually know what the right fix is for this, I only checked > that my patch fixes the build failure. Is is possible that the function > should always be defined. > > Please make sure you review carefully before applying. LGTM. Applied, thanks Arnd.