tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git queue-4.4
head: 559ec5ef53d8d9c75189d786b87bf36cdbcba819
commit: 559ec5ef53d8d9c75189d786b87bf36cdbcba819 [28/28] bonding: fix active-backup
failover for current ARP slave
config: mips-allyesconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.5.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
git checkout 559ec5ef53d8d9c75189d786b87bf36cdbcba819
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-7.5.0 make.cross ARCH=mips
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 >>):
from include/net/sock.h:62,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from drivers/net/bonding/bond_main.c:42:
include/net/netlink.h: In function 'nlmsg_ok':
include/net/netlink.h:337:18: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
nlh->nlmsg_len <= remaining);
^~
include/net/netlink.h: In function 'nlmsg_parse':
include/net/netlink.h:372:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
include/net/netlink.h: In function 'nlmsg_validate':
include/net/netlink.h:405:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
^
In file included from include/net/sch_generic.h:12:0,
from include/linux/filter.h:16,
from include/net/sock.h:62,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from drivers/net/bonding/bond_main.c:42:
include/net/rtnetlink.h: In function 'rtnl_msg_family':
include/net/rtnetlink.h:20:21: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
^~
In file included from include/linux/linkage.h:4:0,
from include/linux/kernel.h:6,
from drivers/net/bonding/bond_main.c:34:
include/net/sch_generic.h: In function 'qdisc_cb_private_validate':
include/net/sch_generic.h:267:33: warning: comparison between signed and unsigned
integer expressions [-Wsign-compare]
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^
include/linux/compiler.h:485:19: note: in definition of macro
'__compiletime_assert'
bool __cond = !(condition); \
^~~~~~~~~
include/linux/compiler.h:505:2: note: in expansion of macro
'_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^~~~~~~~~~~~~~~~~~~
include/linux/bug.h:50:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/bug.h:74:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(condition, "BUILD_BUG_ON failed: " #condition)
^~~~~~~~~~~~~~~~
include/net/sch_generic.h:267:2: note: in expansion of macro 'BUILD_BUG_ON'
BUILD_BUG_ON(sizeof(qcb->data) < sz);
^~~~~~~~~~~~
In file included from include/net/sock.h:62:0,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from drivers/net/bonding/bond_main.c:42:
include/linux/filter.h: In function 'bpf_needs_clear_a':
include/linux/filter.h:517:16: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (first->k == SKF_AD_OFF + SKF_AD_ALU_XOR_X)
^~
In file included from include/net/inet_sock.h:27:0,
from include/net/ip.h:30,
from drivers/net/bonding/bond_main.c:42:
include/net/sock.h: In function 'skb_do_copy_data_nocache':
include/net/sock.h:1838:54: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (csum_and_copy_from_iter(to, copy, &csum, from) != copy)
^~
include/net/sock.h:1842:46: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (copy_from_iter_nocache(to, copy, from) != copy)
^~
include/net/sock.h:1844:44: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
} else if (copy_from_iter(to, copy, from) != copy)
^~
In file included from include/linux/tcp.h:23:0,
from include/linux/ipv6.h:72,
from include/net/ipv6.h:16,
from include/net/inetpeer.h:15,
from include/net/route.h:28,
from include/net/ip.h:31,
from drivers/net/bonding/bond_main.c:42:
include/net/inet_connection_sock.h: In function
'inet_csk_reqsk_queue_is_full':
include/net/inet_connection_sock.h:294:38: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
return inet_csk_reqsk_queue_len(sk) >= sk->sk_max_ack_backlog;
^~
In file included from include/net/bonding.h:29:0,
from drivers/net/bonding/bond_main.c:81:
include/net/bond_3ad.h: In function 'bond_3ad_churn_desc':
include/net/bond_3ad.h:288:12: warning: comparison between signed and unsigned integer
expressions [-Wsign-compare]
if (state >= max_size)
^~
drivers/net/bonding/bond_main.c: In function 'bond_miimon_commit':
drivers/net/bonding/bond_main.c:2115:22: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
slave->speed == SPEED_UNKNOWN ? 0 : slave->speed,
^~
drivers/net/bonding/bond_main.c: In function 'bond_arp_rcv':
drivers/net/bonding/bond_main.c:2447:11: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (alen > skb_headlen(skb)) {
^
drivers/net/bonding/bond_main.c: In function 'bond_ab_arp_inspect':
drivers/net/bonding/bond_main.c:2673:5: error: implicit declaration of function
'bond_propose_link_state'; did you mean 'bond_slave_link_status'?
[-Werror=implicit-function-declaration]
bond_propose_link_state(slave, BOND_LINK_FAIL);
^~~~~~~~~~~~~~~~~~~~~~~
bond_slave_link_status
drivers/net/bonding/bond_main.c: In function 'bond_ab_arp_commit':
> drivers/net/bonding/bond_main.c:2784:4: error: too many arguments
to function 'bond_set_slave_link_state'
bond_set_slave_link_state(slave, BOND_LINK_FAIL,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/net/bonding/bond_main.c:81:0:
include/net/bonding.h:508:20: note: declared here
static inline void bond_set_slave_link_state(struct slave *slave, int state)
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/bonding/bond_main.c: In function 'bond_fold_stats':
drivers/net/bonding/bond_main.c:3305:16: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (i = 0; i < sizeof(*_res) / sizeof(u64); i++) {
^
drivers/net/bonding/bond_main.c: In function 'bond_update_slave_arr':
drivers/net/bonding/bond_main.c:3908:40: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
for (idx = 0; old_arr != NULL && idx < old_arr->count; idx++) {
^
drivers/net/bonding/bond_main.c: In function 'bond_ethtool_get_settings':
drivers/net/bonding/bond_main.c:4092:21: warning: comparison between signed and
unsigned integer expressions [-Wsign-compare]
if (slave->speed != SPEED_UNKNOWN)
^~
drivers/net/bonding/bond_main.c:4099:38: warning: signed and unsigned type in
conditional expression [-Wsign-compare]
ethtool_cmd_speed_set(ecmd, speed ? : SPEED_UNKNOWN);
^
cc1: some warnings being treated as errors
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable queue-4.4
git checkout 559ec5ef53d8d9c75189d786b87bf36cdbcba819
vim +/bond_set_slave_link_state +2784 drivers/net/bonding/bond_main.c
2721
2722 /* Called to commit link state changes noted by inspection step of
2723 * active-backup mode ARP monitor.
2724 *
2725 * Called with RTNL hold.
2726 */
2727 static void bond_ab_arp_commit(struct bonding *bond)
2728 {
2729 unsigned long trans_start;
2730 struct list_head *iter;
2731 struct slave *slave;
2732
2733 bond_for_each_slave(bond, slave, iter) {
2734 switch (slave->new_link) {
2735 case BOND_LINK_NOCHANGE:
2736 continue;
2737
2738 case BOND_LINK_UP:
2739 trans_start = dev_trans_start(slave->dev);
2740 if (rtnl_dereference(bond->curr_active_slave) != slave ||
2741 (!rtnl_dereference(bond->curr_active_slave) &&
2742 bond_time_in_interval(bond, trans_start, 1))) {
2743 struct slave *current_arp_slave;
2744
2745 current_arp_slave = rtnl_dereference(bond->current_arp_slave);
2746 bond_set_slave_link_state(slave, BOND_LINK_UP);
2747 if (current_arp_slave) {
2748 bond_set_slave_inactive_flags(
2749 current_arp_slave,
2750 BOND_SLAVE_NOTIFY_NOW);
2751 RCU_INIT_POINTER(bond->current_arp_slave, NULL);
2752 }
2753
2754 netdev_info(bond->dev, "link status definitely up for interface
%s\n",
2755 slave->dev->name);
2756
2757 if (!rtnl_dereference(bond->curr_active_slave) ||
2758 slave == rtnl_dereference(bond->primary_slave))
2759 goto do_failover;
2760
2761 }
2762
2763 continue;
2764
2765 case BOND_LINK_DOWN:
2766 if (slave->link_failure_count < UINT_MAX)
2767 slave->link_failure_count++;
2768
2769 bond_set_slave_link_state(slave, BOND_LINK_DOWN);
2770 bond_set_slave_inactive_flags(slave,
2771 BOND_SLAVE_NOTIFY_NOW);
2772
2773 netdev_info(bond->dev, "link status definitely down for interface %s,
disabling it\n",
2774 slave->dev->name);
2775
2776 if (slave == rtnl_dereference(bond->curr_active_slave)) {
2777 RCU_INIT_POINTER(bond->current_arp_slave, NULL);
2778 goto do_failover;
2779 }
2780
2781 continue;
2782
2783 case BOND_LINK_FAIL:
2784 bond_set_slave_link_state(slave, BOND_LINK_FAIL,
2785 BOND_SLAVE_NOTIFY_NOW);
2786 bond_set_slave_inactive_flags(slave,
2787 BOND_SLAVE_NOTIFY_NOW);
2788
2789 /* A slave has just been enslaved and has become
2790 * the current active slave.
2791 */
2792 if (rtnl_dereference(bond->curr_active_slave))
2793 RCU_INIT_POINTER(bond->current_arp_slave, NULL);
2794 continue;
2795
2796 default:
2797 netdev_err(bond->dev, "impossible: new_link %d on slave %s\n",
2798 slave->new_link, slave->dev->name);
2799 continue;
2800 }
2801
2802 do_failover:
2803 block_netpoll_tx();
2804 bond_select_active_slave(bond);
2805 unblock_netpoll_tx();
2806 }
2807
2808 bond_set_carrier(bond);
2809 }
2810
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org