Message ID | 20240208111646.535705-4-edumazet@google.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | inet: convert to exit_batch_rtnl | expand |
On Thu, Feb 8, 2024 at 12:16 PM Eric Dumazet <edumazet@google.com> wrote: > > Using exit_batch_rtnl method instead of exit_batch avoids > one rtnl_lock()/rtnl_unlock() pair in netns dismantle. > > > static struct pernet_operations ipmr_net_ops = { > .init = ipmr_net_init, > .exit = ipmr_net_exit, > - .exit_batch = ipmr_net_exit_batch, > + .exit_batch = ipmr_exit_batch_rtnl, > }; Oh well, I thought I fixed this error, I must have missed a step.
Hi Eric, kernel test robot noticed the following build errors: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/ip6mr-use-exit_batch_rtnl-method/20240208-192057 base: net-next/main patch link: https://lore.kernel.org/r/20240208111646.535705-4-edumazet%40google.com patch subject: [PATCH net-next 3/4] ipmr: use exit_batch_rtnl method config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20240209/202402091528.IEa4ESwN-lkp@intel.com/config) compiler: gcc-11 (Debian 11.3.0-12) 11.3.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240209/202402091528.IEa4ESwN-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202402091528.IEa4ESwN-lkp@intel.com/ All errors (new ones prefixed by >>): >> net/ipv4/ipmr.c:3134:23: error: initialization of 'void (*)(struct list_head *)' from incompatible pointer type 'void (*)(struct list_head *, struct list_head *)' [-Werror=incompatible-pointer-types] 3134 | .exit_batch = ipmr_exit_batch_rtnl, | ^~~~~~~~~~~~~~~~~~~~ net/ipv4/ipmr.c:3134:23: note: (near initialization for 'ipmr_net_ops.exit_batch') cc1: some warnings being treated as errors vim +3134 net/ipv4/ipmr.c 3130 3131 static struct pernet_operations ipmr_net_ops = { 3132 .init = ipmr_net_init, 3133 .exit = ipmr_net_exit, > 3134 .exit_batch = ipmr_exit_batch_rtnl, 3135 }; 3136
Hi Eric, kernel test robot noticed the following build errors: [auto build test ERROR on net-next/main] url: https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/ip6mr-use-exit_batch_rtnl-method/20240208-192057 base: net-next/main patch link: https://lore.kernel.org/r/20240208111646.535705-4-edumazet%40google.com patch subject: [PATCH net-next 3/4] ipmr: use exit_batch_rtnl method config: x86_64-rhel-8.3-rust (https://download.01.org/0day-ci/archive/20240209/202402092023.Upwn6RGF-lkp@intel.com/config) compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240209/202402092023.Upwn6RGF-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202402092023.Upwn6RGF-lkp@intel.com/ All errors (new ones prefixed by >>): >> net/ipv4/ipmr.c:3134:16: error: incompatible function pointer types initializing 'void (*)(struct list_head *)' with an expression of type 'void (struct list_head *, struct list_head *)' [-Wincompatible-function-pointer-types] 3134 | .exit_batch = ipmr_exit_batch_rtnl, | ^~~~~~~~~~~~~~~~~~~~ 1 error generated. vim +3134 net/ipv4/ipmr.c 3130 3131 static struct pernet_operations ipmr_net_ops = { 3132 .init = ipmr_net_init, 3133 .exit = ipmr_net_exit, > 3134 .exit_batch = ipmr_exit_batch_rtnl, 3135 }; 3136
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 3622298365105d99c0277f1c1616fb5fc63cdc2d..708c79c465e7212d24d2eb74165b227b9bde1c5f 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -3119,20 +3119,19 @@ static void __net_exit ipmr_net_exit(struct net *net) ipmr_notifier_exit(net); } -static void __net_exit ipmr_net_exit_batch(struct list_head *net_list) +static void __net_exit ipmr_exit_batch_rtnl(struct list_head *net_list, + struct list_head *dev_to_kill) { struct net *net; - rtnl_lock(); list_for_each_entry(net, net_list, exit_list) ipmr_rules_exit(net); - rtnl_unlock(); } static struct pernet_operations ipmr_net_ops = { .init = ipmr_net_init, .exit = ipmr_net_exit, - .exit_batch = ipmr_net_exit_batch, + .exit_batch = ipmr_exit_batch_rtnl, }; int __init ip_mr_init(void)
Using exit_batch_rtnl method instead of exit_batch avoids one rtnl_lock()/rtnl_unlock() pair in netns dismantle. Signed-off-by: Eric Dumazet <edumazet@google.com> --- net/ipv4/ipmr.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)