Message ID | 20230421082450.2572594-1-arnd@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp912317vqo; Fri, 21 Apr 2023 01:36:05 -0700 (PDT) X-Google-Smtp-Source: AKy350aR0HeNOXoCoj7nXTeIjOMrZKfjHX064/CpGf0db614NVyqBm710puQkbdAUD/qcCKd1Cvc X-Received: by 2002:a17:902:eb8f:b0:1a6:494b:5b0 with SMTP id q15-20020a170902eb8f00b001a6494b05b0mr3918418plg.40.1682066164750; Fri, 21 Apr 2023 01:36:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682066164; cv=none; d=google.com; s=arc-20160816; b=TPYdo+CoxaQRiXMsjmMn8eaFbJKqSYNU2DO1+5RXsopUNcCnNZxlqVGK+z1udX+pVZ PNMtmru0S0eUF4DxvlC9uhvhqE0hw1aQ35xM31xeLmT9YrzA6qni1tEjIgdUeOuxgN8d C5IWoouqd9XlbNDTAEG1+aiLuh+PznPO9GCVDoaRycl7Z1VE0YFmMVAojy1wQWmwJpcG iySwaMTvoHyRmeQXf+vswe9zM+iuHh6AQb1VfkYhVvEhPegdH+UKqeQ7somznC2vvYpI 9Hcj35L9OMIm+yOCEcAe8ZhNcEmhwNkv/fw5LuJEPQGj5VS7YR5/RVgBpA36+WGVR95h cBPQ== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x12-20020a170902ec8c00b001a1a0db7f61si4444021plg.336.2023.04.21.01.35.52; Fri, 21 Apr 2023 01:36:04 -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 S231653AbjDUIY7 (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Fri, 21 Apr 2023 04:24:59 -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 <rfc822;linux-kernel@vger.kernel.org>); 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 <arnd@kernel.org> To: Chuck Lever <chuck.lever@oracle.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de>, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1763774210625458471?= X-GMAIL-MSGID: =?utf-8?q?1763774210625458471?= |
Series |
net/handshake: fix section mismatch error for handshake_genl_net_ops
|
|
Commit Message
Arnd Bergmann
April 21, 2023, 8:24 a.m. UTC
From: Arnd Bergmann <arnd@arndb.de> 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 <arnd@arndb.de> --- net/handshake/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> On Apr 21, 2023, at 4:24 AM, Arnd Bergmann <arnd@kernel.org> wrote: > > From: Arnd Bergmann <arnd@arndb.de> > > 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 <arnd@arndb.de> Thank you, Arnd. We received two other patches yesterday with the same build error report and suggested fix. > --- > 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 > -- Chuck Lever
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,