Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4172191rwb; Mon, 31 Jul 2023 02:39:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlFDcrt24mndM1uDX7CwFGvfLWVwBA42RHzALqIf+U49S7vfFEYOi9IyNVkuH8NwKZ4X7OI/ X-Received: by 2002:a17:907:7886:b0:993:f744:d235 with SMTP id ku6-20020a170907788600b00993f744d235mr6748211ejc.6.1690796362472; Mon, 31 Jul 2023 02:39:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690796362; cv=none; d=google.com; s=arc-20160816; b=kkZLzBwdBWtPYhSRAlBnqSevqjUVeTcFUzzaD0RpeucNsu9303uDM/jrzoY43i0+CY UsQHpNcRjpWh209RDPW2fNGJv3iSOaBajLKNbrxqcTVnogih53xNheiQi2boNz2ufWDQ ifmkczlhAv4+IGdgn17cUCBb9KwqRiBv6jDg2qD+pU9hi9NgHL5Ur8YcIZAYiNnfl51q LqxsLZljL4PxySovSwrvtZEH8A6VWGcrbnuu4EfvWGDKGx46lUzwkV/J5vBHvuAzqAI8 IJV4S9SY3Dzg2+xaNmGz4RZe8Ph3DGw+V9kxjC2KxlKYNP5G63+ZAtc6bqfZQGR6Cq6R pXlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=FA2Np0axnCcM7zYYQ9J3PNsrfsw3IGeC9vgEKu3nCGU=; fh=fdv4WqYcXryhzzwxFU3nsTOV8PZu8wGOcAHap2wkMpY=; b=E1TL1BTQWfgBu73Piowrdy1eCD3uT67yFGga+k6XnXxsswFFJPOtfU8WL8h29n4Gr3 VUMJ9enPO5BF5AYkkYR8+tRfTDRJxxNFAtVHkor1Eemn5/EbmdXw4BhFYFHR7KnY8l72 mVPneqtyFG9eHJR83oRksqNlMUas4uC8aln5drooePSm2J6C4ylCcO/XTSAreIYo3gdN KkS0yDPbkYciCUGCJ2Xoo+athJcr17Vw57zNsZ9biQE0MAosaTSLh/DqMN0bVdcbQBRh IjON1Op14ymeIgHoErMBX5O6fid1qSWR/tZI7mUAceRU6hvFo3UhWjEXJLNx5Gr177sU 7hNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jpMYG4ou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020a17090646c600b00992d0de8763si6886355ejs.910.2023.07.31.02.38.56; Mon, 31 Jul 2023 02:39:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jpMYG4ou; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229847AbjGaHVJ (ORCPT + 99 others); Mon, 31 Jul 2023 03:21:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231908AbjGaHT3 (ORCPT ); Mon, 31 Jul 2023 03:19:29 -0400 Received: from mail-lj1-x22e.google.com (mail-lj1-x22e.google.com [IPv6:2a00:1450:4864:20::22e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03F4B19AA; Mon, 31 Jul 2023 00:17:49 -0700 (PDT) Received: by mail-lj1-x22e.google.com with SMTP id 38308e7fff4ca-2b9dc1bff38so22109971fa.1; Mon, 31 Jul 2023 00:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690787867; x=1691392667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FA2Np0axnCcM7zYYQ9J3PNsrfsw3IGeC9vgEKu3nCGU=; b=jpMYG4ou2L8vx2RUTUVRXZn7QJd4O0UHRyIOfry+GKXNJ0D69hHzOKIYQpPA6HaqRE umaqJcW9NZXGPZQINuL3wnrYgUKUIPz5ES5koMDs9pynqpjXiHO0T4X35LGLZqyvkUxt y5rrXas7E/57rsua1yTM/R2vhj/Ln+GI8yIlALAZZMw+DMJp7xcL95cs4+PT6jO7lxJI 4in1qYNAa9Mp3ldQ5ZuTfU2Jnxvms9t8PJfqgFhC+6X45niZPOKR6/+AYAJtA4d2Uv0Q yYLYFl1l8p0M4CNtbKY9eLk022rVeciWFTXU+gb6zmEVa9stfbrZfEcpkrfARkIYsZwN eKjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690787867; x=1691392667; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FA2Np0axnCcM7zYYQ9J3PNsrfsw3IGeC9vgEKu3nCGU=; b=XOO5jxg5UkPRTgzOGeciOatxkkek4uwr74wxjrxJLhxLsRRiAL8Ki3L/b9w3dWVNMT vCW4MqVa/o/YTQgUSxiNpAISzyuSyZwMeHV9mNn68UoXJ4kOmFlLlCLRB1xOuJ+gwore KKxqvdl9G7ALntE9Y1+GtmXvcPWE/BoKt2nl4cAghURtAudqFggCFYWjUCVuruw750Jl EjSXjq//lck2fDHdrsyxIJDZ3McVib+KCdwOi2KswwhwacHMH9PcP1xfJqxdkGginxOa bXS0JcQ60KfJ2d+xPKY7kTMZuGYy3lCCDZZDDUg0H/baWt2VtGXqlxhm08WgzfHIwXjp Pkmw== X-Gm-Message-State: ABy/qLYoMIln5Xdt7Q6QthsLFJ57NV8jpFqgYcsDzvb60bPirnAr6/uz 7ZPSP5nICE9B/gyirxjZm2U= X-Received: by 2002:a2e:7c06:0:b0:2b9:c4f6:fdd with SMTP id x6-20020a2e7c06000000b002b9c4f60fddmr5409655ljc.14.1690787867211; Mon, 31 Jul 2023 00:17:47 -0700 (PDT) Received: from localhost ([165.225.194.214]) by smtp.gmail.com with ESMTPSA id f25-20020a1c6a19000000b003fe24da493dsm231228wmc.41.2023.07.31.00.17.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Jul 2023 00:17:46 -0700 (PDT) From: Joel Granados X-Google-Original-From: Joel Granados To: mcgrof@kernel.org Cc: Catalin Marinas , Iurii Zaikin , Jozsef Kadlecsik , Sven Schnelle , Marcelo Ricardo Leitner , Steffen Klassert , Kees Cook , "D. Wythe" , mptcp@lists.linux.dev, Jakub Kicinski , Vasily Gorbik , Paolo Abeni , coreteam@netfilter.org, Jan Karcher , Alexander Aring , Will Deacon , Stefan Schmidt , Matthieu Baerts , bridge@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, Joerg Reuter , Julian Anastasov , David Ahern , netfilter-devel@vger.kernel.org, Wen Gu , linux-kernel@vger.kernel.org, Santosh Shilimkar , linux-wpan@vger.kernel.org, lvs-devel@vger.kernel.org, Karsten Graul , Miquel Raynal , Herbert Xu , linux-sctp@vger.kernel.org, Tony Lu , Pablo Neira Ayuso , Ralf Baechle , Florian Westphal , willy@infradead.org, Heiko Carstens , "David S. Miller" , linux-rdma@vger.kernel.org, Roopa Prabhu , Alexander Gordeev , Simon Horman , Mat Martineau , josh@joshtriplett.org, Christian Borntraeger , Eric Dumazet , linux-hams@vger.kernel.org, Wenjia Zhang , linux-fsdevel@vger.kernel.org, linux-s390@vger.kernel.org, Xin Long , Nikolay Aleksandrov , netdev@vger.kernel.org, rds-devel@oss.oracle.com, Joel Granados Subject: [PATCH v2 09/14] ax.25: Update to register_net_sysctl_sz Date: Mon, 31 Jul 2023 09:17:23 +0200 Message-Id: <20230731071728.3493794-10-j.granados@samsung.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230731071728.3493794-1-j.granados@samsung.com> References: <20230731071728.3493794-1-j.granados@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Move from register_net_sysctl to register_net_sysctl_sz and pass the ARRAY_SIZE of the ctl_table array that was used to create the table variable. We need to move to the new function in preparation for when we change SIZE_MAX to ARRAY_SIZE() in the register_net_sysctl macro. Failing to do so would erroneously allow ARRAY_SIZE() to be called on a pointer. We hold off the SIZE_MAX to ARRAY_SIZE change until we have migrated all the relevant net sysctl registering functions to register_net_sysctl_sz in subsequent commits. Signed-off-by: Joel Granados --- net/ax25/sysctl_net_ax25.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ax25/sysctl_net_ax25.c b/net/ax25/sysctl_net_ax25.c index 2154d004d3dc..db66e11e7fe8 100644 --- a/net/ax25/sysctl_net_ax25.c +++ b/net/ax25/sysctl_net_ax25.c @@ -159,7 +159,8 @@ int ax25_register_dev_sysctl(ax25_dev *ax25_dev) table[k].data = &ax25_dev->values[k]; snprintf(path, sizeof(path), "net/ax25/%s", ax25_dev->dev->name); - ax25_dev->sysheader = register_net_sysctl(&init_net, path, table); + ax25_dev->sysheader = register_net_sysctl_sz(&init_net, path, table, + ARRAY_SIZE(ax25_param_table)); if (!ax25_dev->sysheader) { kfree(table); return -ENOMEM; -- 2.30.2