summaryrefslogtreecommitdiff
path: root/net/dccp
diff options
context:
space:
mode:
authorHangbin Liu <liuhangbin@gmail.com>2018-04-27 15:59:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-26 09:48:46 +0300
commit2a188d15b21814af58d6a038023d0d8cbd9d6065 (patch)
treeadbc0592d847ffc49c6f32a2b9e5f090db9ed48e /net/dccp
parenta221a0c1db1e343ba64a41e21a39aea73d35ab7f (diff)
downloadlinux-2a188d15b21814af58d6a038023d0d8cbd9d6065.tar.xz
bridge: check iface upper dev when setting master via ioctl
[ Upstream commit e8238fc2bd7b4c3c7554fa2df067e796610212fc ] 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/dccp')
0 files changed, 0 insertions, 0 deletions