lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iJCU7trenNNozL3quNDVZHuqDizF02N+uFbmE9kunuVeQ@mail.gmail.com>
Date: Tue, 15 Oct 2024 17:20:53 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Arnd Bergmann <arnd@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, 
	Paolo Abeni <pabeni@...hat.com>, Kuniyuki Iwashima <kuniyu@...zon.com>, Arnd Bergmann <arnd@...db.de>, 
	netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rtnetlink: wire up rtnl_net_debug_exit

On Tue, Oct 15, 2024 at 5:10 PM Arnd Bergmann <arnd@...nel.org> wrote:
>
> From: Arnd Bergmann <arnd@...db.de>
>
> The function is never called, but causes a build warning:
>
> net/core/rtnl_net_debug.c:125:20: error: 'rtnl_net_debug_exit' defined but not used [-Werror=unused-function]
>   125 | static void __exit rtnl_net_debug_exit(void)
>       |                    ^~~~~~~~~~~~~~~~~~~
> WARNING: modpost: vmlinux: section mismatch in reference: rtnl_net_debug_exit+0x1c (section: .exit.text) -> rtnl_net_debug_net_ops (section: .init.data)
>
> Use this as the exitcall as was clearly intended and remove the __net_initdata
> annotation on rtnl_net_debug_net_ops to ensure the structure remains there.
>
> Fixes: 03fa53485659 ("rtnetlink: Add ASSERT_RTNL_NET() placeholder for netdev notifier.")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---

This was fixed with :

commit bb9df28e6fcda6a96860e7b77f3912ef50e06793
Author: Kuniyuki Iwashima <kuniyu@...zon.com>
Date:   Thu Oct 10 10:24:33 2024 -0700

    rtnl_net_debug: Remove rtnl_net_debug_exit().

    kernel test robot reported section mismatch in rtnl_net_debug_exit().

      WARNING: modpost: vmlinux: section mismatch in reference:
rtnl_net_debug_exit+0x20 (section: .exit.text) ->
rtnl_net_debug_net_ops (section: .init.data)

    rtnl_net_debug_exit() uses rtnl_net_debug_net_ops() that is annotated
    as __net_initdata, but this file is always built-in.

    Let's remove rtnl_net_debug_exit().

    Fixes: 03fa53485659 ("rtnetlink: Add ASSERT_RTNL_NET() placeholder
for netdev notifier.")
    Reported-by: kernel test robot <lkp@...el.com>
    Closes: https://lore.kernel.org/oe-kbuild-all/202410101854.i0vQCaDz-lkp@intel.com/
    Signed-off-by: Kuniyuki Iwashima <kuniyu@...zon.com>
    Link: https://patch.msgid.link/20241010172433.67694-1-kuniyu@amazon.com
    Signed-off-by: Paolo Abeni <pabeni@...hat.com>

diff --git a/net/core/rtnl_net_debug.c b/net/core/rtnl_net_debug.c
index e90a32242e22b6d1d4d4a7888b19a9d8137f8fc4..f406045cbd0e60653af480270bc45928f9e92839
100644
--- a/net/core/rtnl_net_debug.c
+++ b/net/core/rtnl_net_debug.c
@@ -122,10 +122,4 @@ static int __init rtnl_net_debug_init(void)
        return ret;
 }

-static void __exit rtnl_net_debug_exit(void)
-{
-       unregister_netdevice_notifier(&rtnl_net_debug_block);
-       unregister_pernet_device(&rtnl_net_debug_net_ops);
-}
-
 subsys_initcall(rtnl_net_debug_init);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ