[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20180429.210840.664235916308990188.davem@davemloft.net>
Date: Sun, 29 Apr 2018 21:08:40 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: liuhangbin@...il.com
Cc: netdev@...r.kernel.org, nikolay@...ulusnetworks.com,
dvyukov@...gle.com,
syzbot+de73361ee4971b6e6f75@...kaller.appspotmail.com
Subject: Re: [PATCHv2 net] bridge: check iface upper dev when setting
master via ioctl
From: Hangbin Liu <liuhangbin@...il.com>
Date: Fri, 27 Apr 2018 20:59:24 +0800
> 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@...kaller.appspotmail.com
> Signed-off-by: Hangbin Liu <liuhangbin@...il.com>
Applied and queued up for -stable, thanks.
Powered by blists - more mailing lists