linux-stable/drivers/net/netdevsim
Arnd Bergmann 87248d31d1 netdevsim: remove incorrect __net_initdata annotations
The __net_initdata section cannot currently be used for structures that
get cleaned up in an exitcall using unregister_pernet_operations:

WARNING: vmlinux.o(.text+0x868c34): Section mismatch in reference from the function nsim_devlink_exit() to the (unknown reference) .init.data:(unknown)
The function nsim_devlink_exit() references
the (unknown reference) __initdata (unknown).
This is often because nsim_devlink_exit lacks a __initdata
annotation or the annotation of (unknown) is wrong.
WARNING: vmlinux.o(.text+0x868c64): Section mismatch in reference from the function nsim_devlink_init() to the (unknown reference) .init.data:(unknown)
WARNING: vmlinux.o(.text+0x8692bc): Section mismatch in reference from the function nsim_fib_exit() to the (unknown reference) .init.data:(unknown)
WARNING: vmlinux.o(.text+0x869300): Section mismatch in reference from the function nsim_fib_init() to the (unknown reference) .init.data:(unknown)

As that warning tells us, discarding the structure after a module is
loaded would lead to a undefined behavior when that module is removed.

It might be possible to change that annotation so it has no effect for
loadable modules, but I have not figured out exactly how to do that, and
we want this to be fixed in -rc1.

This just removes the annotations, just like we do for all other such
modules.

Fixes: 37923ed6b8 ("netdevsim: Add simple FIB resource controller via devlink")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-04 12:53:37 -04:00
..
bpf.c netdevsim: fix overflow on the error path 2018-02-01 11:22:51 +01:00
devlink.c netdevsim: remove incorrect __net_initdata annotations 2018-04-04 12:53:37 -04:00
fib.c netdevsim: remove incorrect __net_initdata annotations 2018-04-04 12:53:37 -04:00
Makefile netdevsim: Add simple FIB resource controller via devlink 2018-03-29 14:10:31 -04:00
netdev.c netdevsim: Change nsim_devlink_setup to return error to caller 2018-03-31 22:22:10 -04:00
netdevsim.h netdevsim: Change nsim_devlink_setup to return error to caller 2018-03-31 22:22:10 -04:00