kernel-tls-handshake.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever III <chuck.lever@oracle.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"kernel-tls-handshake@lists.linux.dev"
	<kernel-tls-handshake@lists.linux.dev>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] net/handshake: fix section mismatch error for handshake_genl_net_ops
Date: Fri, 21 Apr 2023 13:25:16 +0000	[thread overview]
Message-ID: <01A42FB6-9391-4E31-AF58-A522F284A893@oracle.com> (raw)
In-Reply-To: <20230421082450.2572594-1-arnd@kernel.org>



> 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



      reply	other threads:[~2023-04-21 13:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  8:24 [PATCH] net/handshake: fix section mismatch error for handshake_genl_net_ops Arnd Bergmann
2023-04-21 13:25 ` Chuck Lever III [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01A42FB6-9391-4E31-AF58-A522F284A893@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).