<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/bridge, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-02-26T20:04:02Z</updated>
<entry>
<title>net: ndo_fdb_dump should report -EMSGSIZE to rtnl_fdb_dump.</title>
<updated>2016-02-26T20:04:02Z</updated>
<author>
<name>MINOURA Makoto / 箕浦 真</name>
<email>minoura@valinux.co.jp</email>
</author>
<published>2016-02-25T05:20:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=472681d57a5dde7c6d16b05469be57f1c4ed9d99'/>
<id>urn:sha1:472681d57a5dde7c6d16b05469be57f1c4ed9d99</id>
<content type='text'>
When the send skbuff reaches the end, nlmsg_put and friends returns
-EMSGSIZE but it is silently thrown away in ndo_fdb_dump. It is called
within a for_each_netdev loop and the first fdb entry of a following
netdev could fit in the remaining skbuff.  This breaks the mechanism
of cb-&gt;args[0] and idx to keep track of the entries that are already
dumped, which results missing entries in bridge fdb show command.

Signed-off-by: Minoura Makoto &lt;minoura@valinux.co.jp&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: mdb: avoid uninitialized variable warning</title>
<updated>2016-02-16T20:37:28Z</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2016-02-10T15:09:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=56bb7fd994f4cc163de08006bf68d959027a9f36'/>
<id>urn:sha1:56bb7fd994f4cc163de08006bf68d959027a9f36</id>
<content type='text'>
A recent change to the mdb code confused the compiler to the point
where it did not realize that the port-group returned from
br_mdb_add_group() is always valid when the function returns a nonzero
return value, so we get a spurious warning:

net/bridge/br_mdb.c: In function 'br_mdb_add':
net/bridge/br_mdb.c:542:4: error: 'pg' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    __br_mdb_notify(dev, entry, RTM_NEWMDB, pg);

Slightly rearranging the code in br_mdb_add_group() makes the problem
go away, as gcc is clever enough to see that both functions check
for 'ret != 0'.

Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Fixes: 9e8430f8d60d ("bridge: mdb: Passing the port-group pointer to br_mdb module")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>switchdev: Require RTNL mutex to be held when sending FDB notifications</title>
<updated>2016-01-29T00:21:31Z</updated>
<author>
<name>Ido Schimmel</name>
<email>idosch@mellanox.com</email>
</author>
<published>2016-01-27T14:16:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f2c6ae5c64c353fb1b0425e4747e5603feadba1'/>
<id>urn:sha1:4f2c6ae5c64c353fb1b0425e4747e5603feadba1</id>
<content type='text'>
When switchdev drivers process FDB notifications from the underlying
device they resolve the netdev to which the entry points to and notify
the bridge using the switchdev notifier.

However, since the RTNL mutex is not held there is nothing preventing
the netdev from disappearing in the middle, which will cause
br_switchdev_event() to dereference a non-existing netdev.

Make switchdev drivers hold the lock at the beginning of the
notification processing session and release it once it ends, after
notifying the bridge.

Also, remove switchdev_mutex and fdb_lock, as they are no longer needed
when RTNL mutex is held.

Fixes: 03bf0c281234 ("switchdev: introduce switchdev notifier")
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: fix lockdep addr_list_lock false positive splat</title>
<updated>2016-01-15T20:40:45Z</updated>
<author>
<name>Nikolay Aleksandrov</name>
<email>nikolay@cumulusnetworks.com</email>
</author>
<published>2016-01-15T18:03:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c6894dec8ea9ae05747124dce98b3b5c2e69b168'/>
<id>urn:sha1:c6894dec8ea9ae05747124dce98b3b5c2e69b168</id>
<content type='text'>
After promisc mode management was introduced a bridge device could do
dev_set_promiscuity from its ndo_change_rx_flags() callback which in
turn can be called after the bridge's addr_list_lock has been taken
(e.g. by dev_uc_add). This causes a false positive lockdep splat because
the port interfaces' addr_list_lock is taken when br_manage_promisc()
runs after the bridge's addr list lock was already taken.
To remove the false positive introduce a custom bridge addr_list_lock
class and set it on bridge init.
A simple way to reproduce this is with the following:
$ brctl addbr br0
$ ip l add l br0 br0.100 type vlan id 100
$ ip l set br0 up
$ ip l set br0.100 up
$ echo 1 &gt; /sys/class/net/br0/bridge/vlan_filtering
$ brctl addif br0 eth0
Splat:
[   43.684325] =============================================
[   43.684485] [ INFO: possible recursive locking detected ]
[   43.684636] 4.4.0-rc8+ #54 Not tainted
[   43.684755] ---------------------------------------------
[   43.684906] brctl/1187 is trying to acquire lock:
[   43.685047]  (_xmit_ETHER){+.....}, at: [&lt;ffffffff8150169e&gt;] dev_set_rx_mode+0x1e/0x40
[   43.685460]  but task is already holding lock:
[   43.685618]  (_xmit_ETHER){+.....}, at: [&lt;ffffffff815072a7&gt;] dev_uc_add+0x27/0x80
[   43.686015]  other info that might help us debug this:
[   43.686316]  Possible unsafe locking scenario:

[   43.686743]        CPU0
[   43.686967]        ----
[   43.687197]   lock(_xmit_ETHER);
[   43.687544]   lock(_xmit_ETHER);
[   43.687886] *** DEADLOCK ***

[   43.688438]  May be due to missing lock nesting notation

[   43.688882] 2 locks held by brctl/1187:
[   43.689134]  #0:  (rtnl_mutex){+.+.+.}, at: [&lt;ffffffff81510317&gt;] rtnl_lock+0x17/0x20
[   43.689852]  #1:  (_xmit_ETHER){+.....}, at: [&lt;ffffffff815072a7&gt;] dev_uc_add+0x27/0x80
[   43.690575] stack backtrace:
[   43.690970] CPU: 0 PID: 1187 Comm: brctl Not tainted 4.4.0-rc8+ #54
[   43.691270] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014
[   43.691770]  ffffffff826a25c0 ffff8800369fb8e0 ffffffff81360ceb ffffffff826a25c0
[   43.692425]  ffff8800369fb9b8 ffffffff810d0466 ffff8800369fb968 ffffffff81537139
[   43.693071]  ffff88003a08c880 0000000000000000 00000000ffffffff 0000000002080020
[   43.693709] Call Trace:
[   43.693931]  [&lt;ffffffff81360ceb&gt;] dump_stack+0x4b/0x70
[   43.694199]  [&lt;ffffffff810d0466&gt;] __lock_acquire+0x1e46/0x1e90
[   43.694483]  [&lt;ffffffff81537139&gt;] ? netlink_broadcast_filtered+0x139/0x3e0
[   43.694789]  [&lt;ffffffff8153b5da&gt;] ? nlmsg_notify+0x5a/0xc0
[   43.695064]  [&lt;ffffffff810d10f5&gt;] lock_acquire+0xe5/0x1f0
[   43.695340]  [&lt;ffffffff8150169e&gt;] ? dev_set_rx_mode+0x1e/0x40
[   43.695623]  [&lt;ffffffff815edea5&gt;] _raw_spin_lock_bh+0x45/0x80
[   43.695901]  [&lt;ffffffff8150169e&gt;] ? dev_set_rx_mode+0x1e/0x40
[   43.696180]  [&lt;ffffffff8150169e&gt;] dev_set_rx_mode+0x1e/0x40
[   43.696460]  [&lt;ffffffff8150189c&gt;] dev_set_promiscuity+0x3c/0x50
[   43.696750]  [&lt;ffffffffa0586845&gt;] br_port_set_promisc+0x25/0x50 [bridge]
[   43.697052]  [&lt;ffffffffa05869aa&gt;] br_manage_promisc+0x8a/0xe0 [bridge]
[   43.697348]  [&lt;ffffffffa05826ee&gt;] br_dev_change_rx_flags+0x1e/0x20 [bridge]
[   43.697655]  [&lt;ffffffff81501532&gt;] __dev_set_promiscuity+0x132/0x1f0
[   43.697943]  [&lt;ffffffff81501672&gt;] __dev_set_rx_mode+0x82/0x90
[   43.698223]  [&lt;ffffffff815072de&gt;] dev_uc_add+0x5e/0x80
[   43.698498]  [&lt;ffffffffa05b3c62&gt;] vlan_device_event+0x542/0x650 [8021q]
[   43.698798]  [&lt;ffffffff8109886d&gt;] notifier_call_chain+0x5d/0x80
[   43.699083]  [&lt;ffffffff810988b6&gt;] raw_notifier_call_chain+0x16/0x20
[   43.699374]  [&lt;ffffffff814f456e&gt;] call_netdevice_notifiers_info+0x6e/0x80
[   43.699678]  [&lt;ffffffff814f4596&gt;] call_netdevice_notifiers+0x16/0x20
[   43.699973]  [&lt;ffffffffa05872be&gt;] br_add_if+0x47e/0x4c0 [bridge]
[   43.700259]  [&lt;ffffffffa058801e&gt;] add_del_if+0x6e/0x80 [bridge]
[   43.700548]  [&lt;ffffffffa0588b5f&gt;] br_dev_ioctl+0xaf/0xc0 [bridge]
[   43.700836]  [&lt;ffffffff8151a7ac&gt;] dev_ifsioc+0x30c/0x3c0
[   43.701106]  [&lt;ffffffff8151aac9&gt;] dev_ioctl+0xf9/0x6f0
[   43.701379]  [&lt;ffffffff81254345&gt;] ? mntput_no_expire+0x5/0x450
[   43.701665]  [&lt;ffffffff812543ee&gt;] ? mntput_no_expire+0xae/0x450
[   43.701947]  [&lt;ffffffff814d7b02&gt;] sock_do_ioctl+0x42/0x50
[   43.702219]  [&lt;ffffffff814d8175&gt;] sock_ioctl+0x1e5/0x290
[   43.702500]  [&lt;ffffffff81242d0b&gt;] do_vfs_ioctl+0x2cb/0x5c0
[   43.702771]  [&lt;ffffffff81243079&gt;] SyS_ioctl+0x79/0x90
[   43.703033]  [&lt;ffffffff815eebb6&gt;] entry_SYSCALL_64_fastpath+0x16/0x7a

CC: Vlad Yasevich &lt;vyasevic@redhat.com&gt;
CC: Stephen Hemminger &lt;stephen@networkplumber.org&gt;
CC: Bridge list &lt;bridge@lists.linux-foundation.org&gt;
CC: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
CC: Roopa Prabhu &lt;roopa@cumulusnetworks.com&gt;
Fixes: 2796d0c648c9 ("bridge: Automatically manage port promiscuous mode.")
Reported-by: Andy Gospodarek &lt;gospo@cumulusnetworks.com&gt;
Signed-off-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: Reflect MDB entries to hardware</title>
<updated>2016-01-10T21:50:21Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-10T20:06:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f1fecb1d10ecc2f94d19e67827b9f678b36bfc61'/>
<id>urn:sha1:f1fecb1d10ecc2f94d19e67827b9f678b36bfc61</id>
<content type='text'>
Offload MDB changes per port to hardware

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Ido Schimmel &lt;idosch@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Reviewed-by: Nikolay Aleksandrov &lt;nikolay@cumulusnetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next</title>
<updated>2016-01-09T01:53:16Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-01-09T01:53:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9b59377b756670d9516e72276b6c4efa92137b5f'/>
<id>urn:sha1:9b59377b756670d9516e72276b6c4efa92137b5f</id>
<content type='text'>
Pablo Neira Ayuso says:

====================
Netfilter updates for net-next

The following patchset contains Netfilter updates for net-next, they are:

1) Release nf_tables objects on netns destructions via
   nft_release_afinfo().

2) Destroy basechain and rules on netdevice removal in the new netdev
   family.

3) Get rid of defensive check against removal of inactive objects in
   nf_tables.

4) Pass down netns pointer to our existing nfnetlink callbacks, as well
   as commit() and abort() nfnetlink callbacks.

5) Allow to invert limit expression in nf_tables, so we can throttle
   overlimit traffic.

6) Add packet duplication for the netdev family.

7) Add forward expression for the netdev family.

8) Define pr_fmt() in conntrack helpers.

9) Don't leave nfqueue configuration on inconsistent state in case of
   errors, from Ken-ichirou MATSUZAWA, follow up patches are also from
   him.

10) Skip queue option handling after unbind.

11) Return error on unknown both in nfqueue and nflog command.

12) Autoload ctnetlink when NFQA_CFG_F_CONNTRACK is set.

13) Add new NFTA_SET_USERDATA attribute to store user data in sets,
    from Carlos Falgueras.

14) Add support for 64 bit byteordering changes nf_tables, from Florian
    Westphal.

15) Add conntrack byte/packet counter matching support to nf_tables,
    also from Florian.
====================

Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net</title>
<updated>2016-01-07T03:54:18Z</updated>
<author>
<name>David S. Miller</name>
<email>davem@davemloft.net</email>
</author>
<published>2016-01-07T03:54:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5'/>
<id>urn:sha1:9e0efaf6b41bf22c2eb81258fc2a6f1538a643e5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>bridge: add vlan filtering change for new bridged device</title>
<updated>2016-01-06T19:42:41Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-06T12:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=404cdbf0894a0707dd19179d2e21a3ab37f33f54'/>
<id>urn:sha1:404cdbf0894a0707dd19179d2e21a3ab37f33f54</id>
<content type='text'>
Notifying hardware about newly bridged port vlan-aware changes.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: add vlan filtering change notification</title>
<updated>2016-01-06T19:42:40Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-06T12:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6b72a770202a0ad843312436dd50ed4690d7cc65'/>
<id>urn:sha1:6b72a770202a0ad843312436dd50ed4690d7cc65</id>
<content type='text'>
Notifying hardware about bridge vlan-aware changes.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>bridge: Propagate vlan add failure to user</title>
<updated>2016-01-06T19:42:40Z</updated>
<author>
<name>Elad Raz</name>
<email>eladr@mellanox.com</email>
</author>
<published>2016-01-06T12:01:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=08474cc1e6ea71237cab7e4a651a623c9dea1084'/>
<id>urn:sha1:08474cc1e6ea71237cab7e4a651a623c9dea1084</id>
<content type='text'>
Disallow adding interfaces to a bridge when vlan filtering operation
failed. Send the failure code to the user.

Signed-off-by: Elad Raz &lt;eladr@mellanox.com&gt;
Signed-off-by: Jiri Pirko &lt;jiri@mellanox.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
