<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/net/team, branch v4.19.112</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.19.112'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2020-03-18T06:14:16+00:00</updated>
<entry>
<title>team: add missing attribute validation for array index</title>
<updated>2020-03-18T06:14:16+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-03-03T05:05:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=98be45047c3304a0b6d687ce2829d25b0d32e4a3'/>
<id>urn:sha1:98be45047c3304a0b6d687ce2829d25b0d32e4a3</id>
<content type='text'>
[ Upstream commit 669fcd7795900cd1880237cbbb57a7db66cb9ac8 ]

Add missing attribute validation for TEAM_ATTR_OPTION_ARRAY_INDEX
to the netlink policy.

Fixes: b13033262d24 ("team: introduce array options")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: add missing attribute validation for port ifindex</title>
<updated>2020-03-18T06:14:16+00:00</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2020-03-03T05:05:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c2dcaf80a0f3e239e042c15dcdea96e8f03c970'/>
<id>urn:sha1:1c2dcaf80a0f3e239e042c15dcdea96e8f03c970</id>
<content type='text'>
[ Upstream commit dd25cb272ccce4db67dc8509278229099e4f5e99 ]

Add missing attribute validation for TEAM_ATTR_OPTION_PORT_IFINDEX
to the netlink policy.

Fixes: 80f7c6683fe0 ("team: add support for per-port options")
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: Add vlan tx offload to hw_enc_features</title>
<updated>2019-08-25T08:48:04+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-08-08T06:22:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e89bb758c030150f6cf0a990011f109258b815dd'/>
<id>urn:sha1:e89bb758c030150f6cf0a990011f109258b815dd</id>
<content type='text'>
[ Upstream commit 227f2f030e28d8783c3d10ce70ff4ba79cad653f ]

We should also enable team's vlan tx offload in hw_enc_features,
pass the vlan packets to the slave devices with vlan tci, let the
slave handle vlan tunneling offload implementation.

Fixes: 3268e5cb494d ("team: Advertise tunneling offload features")
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: Always enable vlan tx offload</title>
<updated>2019-07-03T11:14:47+00:00</updated>
<author>
<name>YueHaibing</name>
<email>yuehaibing@huawei.com</email>
</author>
<published>2019-06-26T16:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=32b711f57ce7b960b8a890d7ab846a95c0261616'/>
<id>urn:sha1:32b711f57ce7b960b8a890d7ab846a95c0261616</id>
<content type='text'>
[ Upstream commit ee4297420d56a0033a8593e80b33fcc93fda8509 ]

We should rather have vlan_tci filled all the way down
to the transmitting netdevice and let it do the hw/sw
vlan implementation.

Suggested-by: Jiri Pirko &lt;jiri@resnulli.us&gt;
Signed-off-by: YueHaibing &lt;yuehaibing@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: fix possible recursive locking when add slaves</title>
<updated>2019-05-02T07:59:00+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2019-04-19T06:31:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7ce836e8a963fb1a2dc24b49cfe0aba6327b61bf'/>
<id>urn:sha1:7ce836e8a963fb1a2dc24b49cfe0aba6327b61bf</id>
<content type='text'>
[ Upstream commit 925b0c841e066b488cc3a60272472b2c56300704 ]

If we add a bond device which is already the master of the team interface,
we will hold the team-&gt;lock in team_add_slave() first and then request the
lock in team_set_mac_address() again. The functions are called like:

- team_add_slave()
 - team_port_add()
   - team_port_enter()
     - team_modeop_port_enter()
       - __set_port_dev_addr()
         - dev_set_mac_address()
           - bond_set_mac_address()
             - dev_set_mac_address()
  	       - team_set_mac_address

Although team_upper_dev_link() would check the upper devices but it is
called too late. Fix it by adding a checking before processing the slave.

v2: Do not split the string in netdev_err()

Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: set slave to promisc if team is already in promisc mode</title>
<updated>2019-04-27T07:36:31+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2019-04-08T08:45:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a60a47206a31b92af27ca65b66089b21c5b66d78'/>
<id>urn:sha1:a60a47206a31b92af27ca65b66089b21c5b66d78</id>
<content type='text'>
[ Upstream commit 43c2adb9df7ddd6560fd3546d925b42cef92daa0 ]

After adding a team interface to bridge, the team interface will enter
promisc mode. Then if we add a new slave to team0, the slave will keep
promisc off. Fix it by setting slave to promisc on if team master is
already in promisc mode, also do the same for allmulti.

v2: add promisc and allmulti checking when delete ports

Fixes: 3d249d4ca7d0 ("net: introduce ethernet teaming device")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: use operstate consistently for linkup</title>
<updated>2019-03-19T12:12:40+00:00</updated>
<author>
<name>George Wilkie</name>
<email>gwilkie@vyatta.att-mail.com</email>
</author>
<published>2019-02-20T08:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e5c31b5a685441786592edb18272caa47b4fb3d7'/>
<id>urn:sha1:e5c31b5a685441786592edb18272caa47b4fb3d7</id>
<content type='text'>
[ Upstream commit 8c7a77267eec81dd81af8412f29e50c0b1082548 ]

When a port is added to a team, its initial state is derived
from netif_carrier_ok rather than netif_oper_up.
If it is carrier up but operationally down at the time of being
added, the port state.linkup will be set prematurely.
port state.linkup should be set consistently using
netif_oper_up rather than netif_carrier_ok.

Fixes: f1d22a1e0595 ("team: account for oper state")
Signed-off-by: George Wilkie &lt;gwilkie@vyatta.att-mail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: Free BPF filter when unregistering netdev</title>
<updated>2019-03-10T06:17:17+00:00</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2019-03-03T07:35:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=089100d5fb434a655706799279b1ce0f79d864d1'/>
<id>urn:sha1:089100d5fb434a655706799279b1ce0f79d864d1</id>
<content type='text'>
[ Upstream commit 692c31bd4054212312396b1d303bffab2c5b93a7 ]

When team is used in loadbalance mode a BPF filter can be used to
provide a hash which will determine the Tx port.

When the netdev is later unregistered the filter is not freed which
results in memory leaks [1].

Fix by freeing the program and the corresponding filter when
unregistering the netdev.

[1]
unreferenced object 0xffff8881dbc47cc8 (size 16):
  comm "teamd", pid 3068, jiffies 4294997779 (age 438.247s)
  hex dump (first 16 bytes):
    a3 00 6b 6b 6b 6b 6b 6b 88 a5 82 e1 81 88 ff ff  ..kkkkkk........
  backtrace:
    [&lt;000000008a3b47e3&gt;] team_nl_cmd_options_set+0x88f/0x11b0
    [&lt;00000000c4f4f27e&gt;] genl_family_rcv_msg+0x78f/0x1080
    [&lt;00000000610ef838&gt;] genl_rcv_msg+0xca/0x170
    [&lt;00000000a281df93&gt;] netlink_rcv_skb+0x132/0x380
    [&lt;000000004d9448a2&gt;] genl_rcv+0x29/0x40
    [&lt;000000000321b2f4&gt;] netlink_unicast+0x4c0/0x690
    [&lt;000000008c25dffb&gt;] netlink_sendmsg+0x929/0xe10
    [&lt;00000000068298c5&gt;] sock_sendmsg+0xc8/0x110
    [&lt;0000000082a61ff0&gt;] ___sys_sendmsg+0x77a/0x8f0
    [&lt;00000000663ae29d&gt;] __sys_sendmsg+0xf7/0x250
    [&lt;0000000027c5f11a&gt;] do_syscall_64+0x14d/0x610
    [&lt;000000006cfbc8d3&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [&lt;00000000e23197e2&gt;] 0xffffffffffffffff
unreferenced object 0xffff8881e182a588 (size 2048):
  comm "teamd", pid 3068, jiffies 4294997780 (age 438.247s)
  hex dump (first 32 bytes):
    20 00 00 00 02 00 00 00 30 00 00 00 28 f0 ff ff   .......0...(...
    07 00 00 00 00 00 00 00 28 00 00 00 00 00 00 00  ........(.......
  backtrace:
    [&lt;000000002daf01fb&gt;] lb_bpf_func_set+0x45c/0x6d0
    [&lt;000000008a3b47e3&gt;] team_nl_cmd_options_set+0x88f/0x11b0
    [&lt;00000000c4f4f27e&gt;] genl_family_rcv_msg+0x78f/0x1080
    [&lt;00000000610ef838&gt;] genl_rcv_msg+0xca/0x170
    [&lt;00000000a281df93&gt;] netlink_rcv_skb+0x132/0x380
    [&lt;000000004d9448a2&gt;] genl_rcv+0x29/0x40
    [&lt;000000000321b2f4&gt;] netlink_unicast+0x4c0/0x690
    [&lt;000000008c25dffb&gt;] netlink_sendmsg+0x929/0xe10
    [&lt;00000000068298c5&gt;] sock_sendmsg+0xc8/0x110
    [&lt;0000000082a61ff0&gt;] ___sys_sendmsg+0x77a/0x8f0
    [&lt;00000000663ae29d&gt;] __sys_sendmsg+0xf7/0x250
    [&lt;0000000027c5f11a&gt;] do_syscall_64+0x14d/0x610
    [&lt;000000006cfbc8d3&gt;] entry_SYSCALL_64_after_hwframe+0x49/0xbe
    [&lt;00000000e23197e2&gt;] 0xffffffffffffffff

Fixes: 01d7f30a9f96 ("team: add loadbalance mode")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Reported-by: Amit Cohen &lt;amitc@mellanox.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: avoid complex list operations in team_nl_cmd_options_set()</title>
<updated>2019-02-27T09:08:59+00:00</updated>
<author>
<name>Cong Wang</name>
<email>xiyou.wangcong@gmail.com</email>
</author>
<published>2019-02-12T05:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=c031b433801f7bae4d92e54ddaff9794c0f1ff6e'/>
<id>urn:sha1:c031b433801f7bae4d92e54ddaff9794c0f1ff6e</id>
<content type='text'>
[ Upstream commit 2fdeee2549231b1f989f011bb18191f5660d3745 ]

The current opt_inst_list operations inside team_nl_cmd_options_set()
is too complex to track:

    LIST_HEAD(opt_inst_list);
    nla_for_each_nested(...) {
        list_for_each_entry(opt_inst, &amp;team-&gt;option_inst_list, list) {
            if (__team_option_inst_tmp_find(&amp;opt_inst_list, opt_inst))
                continue;
            list_add(&amp;opt_inst-&gt;tmp_list, &amp;opt_inst_list);
        }
    }
    team_nl_send_event_options_get(team, &amp;opt_inst_list);

as while we retrieve 'opt_inst' from team-&gt;option_inst_list, it could
be added to the local 'opt_inst_list' for multiple times. The
__team_option_inst_tmp_find() doesn't work, as the setter
team_mode_option_set() still calls team-&gt;ops.exit() which uses
-&gt;tmp_list too in __team_options_change_check().

Simplify the list operations by moving the 'opt_inst_list' and
team_nl_send_event_options_get() into the nla_for_each_nested() loop so
that it can be guranteed that we won't insert a same list entry for
multiple times. Therefore, __team_option_inst_tmp_find() can be removed
too.

Fixes: 4fb0534fb7bb ("team: avoid adding twice the same option to the event list")
Fixes: 2fcdb2c9e659 ("team: allow to send multiple set events in one message")
Reported-by: syzbot+4d4af685432dc0e56c91@syzkaller.appspotmail.com
Reported-by: syzbot+68ee510075cf64260cc4@syzkaller.appspotmail.com
Cc: Jiri Pirko &lt;jiri@resnulli.us&gt;
Cc: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: Cong Wang &lt;xiyou.wangcong@gmail.com&gt;
Acked-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>team: no need to do team_notify_peers or team_mcast_rejoin when disabling port</title>
<updated>2018-12-13T08:16:15+00:00</updated>
<author>
<name>Hangbin Liu</name>
<email>liuhangbin@gmail.com</email>
</author>
<published>2018-11-22T08:15:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ebc4b790103d66d3c6bc5b74ee0c9d4730adcca9'/>
<id>urn:sha1:ebc4b790103d66d3c6bc5b74ee0c9d4730adcca9</id>
<content type='text'>
[ Upstream commit 5ed9dc99107144f83b6c1bb52a69b58875baf540 ]

team_notify_peers() will send ARP and NA to notify peers. team_mcast_rejoin()
will send multicast join group message to notify peers. We should do this when
enabling/changed to a new port. But it doesn't make sense to do it when a port
is disabled.

On the other hand, when we set mcast_rejoin_count to 2, and do a failover,
team_port_disable() will increase mcast_rejoin.count_pending to 2 and then
team_port_enable() will increase mcast_rejoin.count_pending to 4. We will send
4 mcast rejoin messages at latest, which will make user confused. The same
with notify_peers.count.

Fix it by deleting team_notify_peers() and team_mcast_rejoin() in
team_port_disable().

Reported-by: Liang Li &lt;liali@redhat.com&gt;
Fixes: fc423ff00df3a ("team: add peer notification")
Fixes: 492b200efdd20 ("team: add support for sending multicast rejoins")
Signed-off-by: Hangbin Liu &lt;liuhangbin@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
