Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1940226rwr; Fri, 21 Apr 2023 01:40:55 -0700 (PDT) X-Google-Smtp-Source: AKy350ZY6vvVLTuixjBekxAzauOvY1es8Q4JHndZR2jI4RJhQBxJ655Zb2wmIF1hnvrDR9JjXqQ1 X-Received: by 2002:a05:6a20:e606:b0:ee:a89f:5b55 with SMTP id my6-20020a056a20e60600b000eea89f5b55mr5306578pzb.34.1682066455478; Fri, 21 Apr 2023 01:40:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682066455; cv=none; d=google.com; s=arc-20160816; b=TOHYWxvRfmdqJQAX/xfNTgOUSx93NnpJaurzrNr5Usq3BHWsYv05lopMZlxdB/oDcL r9yW/57qVt77NHFjTRCRDxTnUg6cwHu+IbRhxZq/temawla0maNGjKMiAQNWXjYb4O3k osLYwaG7OhKC2Yj8UIPfKNXYM8BXTU5kdrLmfHeePpIcQMGAnIRj/0IM00/2DffK1UQW dKJMU1Ngj+wpMbJL0BtRKRy++gTpVJBN4kT/elvcnJGWz3tAoh7O7sLeWfOBgtOYy7Zj lcB+pH2w9MxfbL+eJVmXxO9+VZJpkiJJaLXPawWXyUw23cfcwN1wPRflR73Ujk825H3B S1cQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=yvPE6PQLVsEHj5D+c8+YmWfcCND/aBfOKhWDDYm/41o=; b=hgeb/D+C0OCebmPlESgrhch0qDer48fqSpxw6qDVmvue6W6xBt64vEnnZbXo+nMCFa 18/6H4NI+lDQKPWwnbnv0J0YdukxcO3njL5Te9G0xD9gTBY76lt27ISGbq4OcDIQCmvh zEOzj4V2zA3SWfVEwAdf30VjcYaDSrQ9knFfd7vRWyAfRbsqRxa/E0ugHitcgn0ee/GI FSbgbdFmmIEb85h9eFBHkSj2N0zYArCb178KM3RtiwpLdM1Mzqpr7RRf2Yj3mXFxeKla 9qGJCOttp/WmN3uh1GPHeRu/i45hbPxwm7HMGip0A9h3/olPYe13Ov8gNxFcqXg8FaHZ G3Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gPoHk2vG; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d1-20020aa797a1000000b00639b0f72b5esi3917652pfq.55.2023.04.21.01.40.42; Fri, 21 Apr 2023 01:40:55 -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=@kernel.org header.s=k20201202 header.b=gPoHk2vG; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231652AbjDUIY6 (ORCPT + 99 others); Fri, 21 Apr 2023 04:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231625AbjDUIY6 (ORCPT ); Fri, 21 Apr 2023 04:24:58 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353DA10D5; Fri, 21 Apr 2023 01:24:57 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C2CAF618D3; Fri, 21 Apr 2023 08:24:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25A8EC433EF; Fri, 21 Apr 2023 08:24:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1682065496; bh=lnx9JSZMnAAmgHMt+elXCqGcZ+NDFpyQuPzVgtDnPMs=; h=From:To:Cc:Subject:Date:From; b=gPoHk2vGt7f1AqebQOUA7qMS1VF/y2oNIFTTFuPWwRlavGOlcrE/+ziDPr4aEQELP 4wCZHQC0yvueCGv84dWQPSNSkqkjZihMmk5qCcFAVsbqDj4lEwB4llIxQOtUJvZS7S 3KWqbuAVCpPOr80qzB2ZbVx6BjSzocMOcsFrpCcJbCICNlateEUT/VWMdjxEYO61oU wvppHrkuBmoU2NrRjrxbTIWpilwya53P9wR3wlipHO+ioHKi0LvNTsbWbk3x4LMuTU xy3Rm/mlAIi+XKr+xAk72DZQMJ2UWDWLpE8kyGS+xeuaKCWixfWnAnEPL4Y75EsJad ZJ2SnrwB6COEg== From: Arnd Bergmann To: Chuck Lever , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Arnd Bergmann , kernel-tls-handshake@lists.linux.dev, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] net/handshake: fix section mismatch error for handshake_genl_net_ops Date: Fri, 21 Apr 2023 10:24:44 +0200 Message-Id: <20230421082450.2572594-1-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, 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 From: Arnd Bergmann The new netlink interface causes a link-time warning about the use of a discarded symbol: WARNING: modpost: vmlinux.o: section mismatch in reference: handshake_exit (section: .exit.text) -> (unknown) (section: .init.data) ERROR: modpost: Section mismatches detected. There are other instances of pernet_operations that are marked as __net_initdata as well, so I'm not sure what the lifetime rules are, but it's clear that any discarded symbol cannot be referenced from an exitcall, so remove that annotation here. Fixes: 3b3009ea8abb ("net/handshake: Create a NETLINK service for handling handshake requests") Signed-off-by: Arnd Bergmann --- net/handshake/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/handshake/netlink.c b/net/handshake/netlink.c index 8ea0ff993f9f..35c9c445e0b8 100644 --- a/net/handshake/netlink.c +++ b/net/handshake/netlink.c @@ -249,7 +249,7 @@ static void __net_exit handshake_net_exit(struct net *net) } } -static struct pernet_operations __net_initdata handshake_genl_net_ops = { +static struct pernet_operations handshake_genl_net_ops = { .init = handshake_net_init, .exit = handshake_net_exit, .id = &handshake_net_id, -- 2.39.2