Subject: Re: [PATCH v3] net: net_failover: Fix the deadlock in slave register

From: kernel test robot <[email-masked]>
Date: Wed, 13 May 2026 11:58:27 +0800

Hi,

kernel test robot noticed the following build errors:

[auto build test ERROR on net-next/main]
[also build test ERROR on net/main linus/master v7.1-rc3 next-20260508]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/faicker-mo-gmail-com/net-net_failover-Fix-the-deadlock-in-slave-register/20260513-045805
base:   net-next/main
patch link:    https://lore.kernel.org/r/20260507074332.2543229-1-faicker.mo%40gmail.com
patch subject: [PATCH v3] net: net_failover: Fix the deadlock in slave register
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20260513/[email-masked]/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260513/[email-masked]/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 <[email-masked]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email-masked]/

All errors (new ones prefixed by >>):

>> net/core/failover.c:225:4: error: call to undeclared function 'netdev_lock_ops'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     225 |                         netdev_lock_ops(dev);
         |                         ^
   net/core/failover.c:225:4: note: did you mean 'netdev_lock'?
   include/linux/netdevice.h:2822:20: note: 'netdev_lock' declared here
    2822 | static inline void netdev_lock(struct net_device *dev)
         |                    ^
>> net/core/failover.c:227:4: error: call to undeclared function 'netdev_unlock_ops'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     227 |                         netdev_unlock_ops(dev);
         |                         ^
   2 errors generated.

vim +/netdev_lock_ops +225 net/core/failover.c

   213	
   214	static void
   215	failover_existing_slave_register(struct net_device *failover_dev)
   216	{
   217		struct net *net = dev_net(failover_dev);
   218		struct net_device *dev;
   219	
   220		rtnl_lock();
   221		for_each_netdev(net, dev) {
   222			if (netif_is_failover(dev))
   223				continue;
   224			if (ether_addr_equal(failover_dev->perm_addr, dev->perm_addr)) {
 > 225				netdev_lock_ops(dev);
   226				failover_slave_register(dev);
 > 227				netdev_unlock_ops(dev);
   228			}
   229		}
   230		rtnl_unlock();
   231	}
   232	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki