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: sparc-randconfig-m031-20220213
(
https://download.01.org/0day-ci/archive/20220213/202202131427.SK7CctaU-lk...)
compiler: sparc-linux-gcc (GCC) 11.2.0
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=gcc-11.2.0 make.cross O=build_dir
ARCH=sparc 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: In function 'dsa_switch_shutdown':
> net/dsa/dsa2.c:1650:9: error: implicit declaration of function
'dsa_switch_for_each_cpu_port'; did you mean 'dsa_switch_touch_ports'?
[-Werror=implicit-function-declaration]
1650 |
dsa_switch_for_each_cpu_port(dp, ds)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| dsa_switch_touch_ports
> net/dsa/dsa2.c:1650:45: error: expected ';' before
'dp'
1650 | dsa_switch_for_each_cpu_port(dp, ds)
| ^
| ;
1651 | dp->master->dsa_ptr = NULL;
| ~~
cc1: some warnings being treated as errors
vim +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