kernel_optimize_test/net/bridge
Hangbin Liu e8238fc2bd bridge: check iface upper dev when setting master via ioctl
When we set a bond slave's master to bridge via ioctl, we only check
the IFF_BRIDGE_PORT flag. Although we will find the slave's real master
at netdev_master_upper_dev_link() later, it already does some settings
and allocates some resources. It would be better to return as early
as possible.

v1 -> v2:
use netdev_master_upper_dev_get() instead of netdev_has_any_upper_dev()
to check if we have a master, because not all upper devs are masters,
e.g. vlan device.

Reported-by: syzbot+de73361ee4971b6e6f75@syzkaller.appspotmail.com
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-04-29 21:08:02 -04:00
..
netfilter netfilter: ebtables: don't attempt to allocate 0-sized compat array 2018-04-09 17:05:48 +02:00
br_arp_nd_proxy.c
br_device.c net: bridge: disable bridge MTU auto tuning if it was set manually 2018-03-31 22:19:00 -04:00
br_fdb.c net: bridge: Fix uninitialized error in br_fdb_sync_static() 2018-02-01 09:47:37 -05:00
br_forward.c
br_if.c bridge: check iface upper dev when setting master via ioctl 2018-04-29 21:08:02 -04:00
br_input.c
br_ioctl.c
br_mdb.c net: use rtnl_register_module where needed 2017-12-04 11:32:39 -05:00
br_multicast.c net: bridge: Send notification when host join/leaves a group 2017-11-10 13:41:40 +09:00
br_netfilter_hooks.c net: Drop pernet_operations::async 2018-03-27 13:18:09 -04:00
br_netfilter_ipv6.c
br_netlink_tunnel.c
br_netlink.c net: bridge: fix early call to br_stp_change_bridge_id and plug newlink leaks 2017-12-18 13:29:01 -05:00
br_nf_core.c xfrm: Move dst->path into struct xfrm_dst 2017-11-30 09:54:26 -05:00
br_private_stp.h
br_private_tunnel.h
br_private.h net: bridge: disable bridge MTU auto tuning if it was set manually 2018-03-31 22:19:00 -04:00
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_stp.c
br_switchdev.c net: bridge: use rhashtable for fdbs 2017-12-13 15:10:01 -05:00
br_sysfs_br.c net: Use octal not symbolic permissions 2018-03-26 12:07:48 -04:00
br_sysfs_if.c net: Use octal not symbolic permissions 2018-03-26 12:07:48 -04:00
br_vlan_tunnel.c
br_vlan.c bridge: Fix VLAN reference count problem 2018-02-26 15:15:53 -05:00
br.c net: bridge: disable bridge MTU auto tuning if it was set manually 2018-03-31 22:19:00 -04:00
Kconfig
Makefile