Subject: Re: [PATCH net] net: watchdog: fix refcount tracking races

From: kernel test robot <[email-masked]>
Date: Mon, 8 Jun 2026 22:59:44 +0200

Hi Eric,

kernel test robot noticed the following build errors:

[auto build test ERROR on net/main]

url:    https://github.com/intel-lab-lkp/linux/commits/Eric-Dumazet/net-watchdog-fix-refcount-tracking-races/20260608-205327
base:   net/main
patch link:    https://lore.kernel.org/r/20260608123935.524879-1-edumazet%40google.com
patch subject: [PATCH net] net: watchdog: fix refcount tracking races
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20260608/[email-masked]/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260608/[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/sched/sch_generic.c: In function 'netdev_watchdog_up':
>> net/sched/sch_generic.c:594:39: error: incompatible type for argument 1 of 'IS_ERR_OR_NULL'
     594 |                 if (IS_ERR_OR_NULL(dev->watchdog_dev_tracker))
         |                                    ~~~^~~~~~~~~~~~~~~~~~~~~~
         |                                       |
         |                                       netdevice_tracker
   In file included from include/linux/cleanup.h:6,
                    from include/linux/jump_label.h:78,
                    from include/linux/dynamic_debug.h:6,
                    from include/linux/printk.h:620,
                    from include/asm-generic/bug.h:31,
                    from arch/x86/include/asm/bug.h:193,
                    from arch/x86/include/asm/alternative.h:9,
                    from arch/x86/include/asm/barrier.h:5,
                    from include/asm-generic/bitops/generic-non-atomic.h:7,
                    from include/linux/bitops.h:28,
                    from net/sched/sch_generic.c:10:
   include/linux/err.h:90:68: note: expected 'const void *' but argument is of type 'netdevice_tracker'
      90 | static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
         |                                                        ~~~~~~~~~~~~^~~

vim +/IS_ERR_OR_NULL +594 net/sched/sch_generic.c

   584	
   585	void netdev_watchdog_up(struct net_device *dev)
   586	{
   587		if (!dev->netdev_ops->ndo_tx_timeout)
   588			return;
   589		if (dev->watchdog_timeo <= 0)
   590			dev->watchdog_timeo = 5*HZ;
   591		spin_lock_bh(&dev->tx_global_lock);
   592		if (!mod_timer(&dev->watchdog_timer,
   593			       round_jiffies(jiffies + dev->watchdog_timeo))) {
 > 594			if (IS_ERR_OR_NULL(dev->watchdog_dev_tracker))
   595				netdev_hold(dev, &dev->watchdog_dev_tracker,
   596					    GFP_ATOMIC);
   597		}
   598		spin_unlock_bh(&dev->tx_global_lock);
   599	}
   600	EXPORT_SYMBOL_GPL(netdev_watchdog_up);
   601	

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