linux_dsm_epyc7002/net/bridge
Ido Schimmel 4f2c6ae5c6 switchdev: Require RTNL mutex to be held when sending FDB notifications
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: 03bf0c2812 ("switchdev: introduce switchdev notifier")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-01-28 16:21:31 -08:00
..
netfilter
br_device.c bridge: fix lockdep addr_list_lock false positive splat 2016-01-15 15:40:45 -05:00
br_fdb.c
br_forward.c
br_if.c bridge: Propagate vlan add failure to user 2016-01-06 14:42:40 -05:00
br_input.c
br_ioctl.c
br_mdb.c bridge: Reflect MDB entries to hardware 2016-01-10 16:50:21 -05:00
br_multicast.c
br_netfilter_hooks.c
br_netfilter_ipv6.c
br_netlink.c
br_nf_core.c
br_private_stp.h
br_private.h
br_stp_bpdu.c
br_stp_if.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2016-01-06 22:54:18 -05:00
br_stp_timer.c
br_stp.c
br_sysfs_br.c
br_sysfs_if.c
br_vlan.c bridge: add vlan filtering change for new bridged device 2016-01-06 14:42:41 -05:00
br.c switchdev: Require RTNL mutex to be held when sending FDB notifications 2016-01-28 16:21:31 -08:00
Kconfig
Makefile