tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
pending-5.15
head: c8020bc325ff1e12d98d1aa70b77afb4f40e1c5e
commit: 366646dc932a8ee5dea1a71dad1f6e06ea28ac40 [125/134] net: dsa: fix panic when DSA
master device unbinds on shutdown
config: x86_64-randconfig-a005
(
https://download.01.org/0day-ci/archive/20220213/202202131500.dt3gyv0s-lk...)
compiler: clang version 15.0.0 (
https://github.com/llvm/llvm-project
478c237e21b2c3a83e46f26fcbeb3876682f9b14)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-stable pending-5.15
git checkout 366646dc932a8ee5dea1a71dad1f6e06ea28ac40
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir
ARCH=x86_64 SHELL=/bin/bash net/dsa/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> net/dsa/dsa2.c:1650:2: error: implicit declaration of function
'dsa_switch_for_each_cpu_port' [-Werror,-Wimplicit-function-declaration]
dsa_switch_for_each_cpu_port(dp, ds)
^
> net/dsa/dsa2.c:1650:38: error: expected ';' after
expression
dsa_switch_for_each_cpu_port(dp, ds)
^
;
2 errors generated.
vim +/dsa_switch_for_each_cpu_port +1650 net/dsa/dsa2.c
1620
1621 /* If the DSA master chooses to unregister its net_device on .shutdown, DSA is
1622 * blocking that operation from completion, due to the dev_hold taken inside
1623 * netdev_upper_dev_link. Unlink the DSA slave interfaces from being uppers of
1624 * the DSA master, so that the system can reboot successfully.
1625 */
1626 void dsa_switch_shutdown(struct dsa_switch *ds)
1627 {
1628 struct net_device *master, *slave_dev;
1629 struct dsa_port *dp;
1630
1631 mutex_lock(&dsa2_mutex);
1632 rtnl_lock();
1633
1634 list_for_each_entry(dp, &ds->dst->ports, list) {
1635 if (dp->ds != ds)
1636 continue;
1637
1638 if (!dsa_port_is_user(dp))
1639 continue;
1640
1641 master = dp->cpu_dp->master;
1642 slave_dev = dp->slave;
1643
1644 netdev_upper_dev_unlink(master, slave_dev);
1645 }
1646
1647 /* Disconnect from further netdevice notifiers on the master,
1648 * since netdev_uses_dsa() will now return false.
1649 */
1650 dsa_switch_for_each_cpu_port(dp, ds)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org