Commit bfd6008b authored by Di Zhu's avatar Di Zhu Committed by Zheng Zengkai
Browse files

bonding: allow nesting of bonding device

mainline-inclusion
from mainline-v5.16-rc7
commit 4d293fe1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4RADY
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4d293fe1c69c157c15ac06918a805e5fef036682



-------------------------------------------------

The commit 3c9ef511 ("bonding: avoid adding slave device with
IFF_MASTER flag") fix a crash when add slave device with IFF_MASTER,
but it rejects the scenario of nested bonding device.

As Eric Dumazet described: since there indeed is a usage scenario about
nesting bonding, we should not break it.

So we add a new judgment condition to allow nesting of bonding device.

Fixes: 3c9ef511 ("bonding: avoid adding slave device with IFF_MASTER flag")
Suggested-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
Signed-off-by: default avatarDi Zhu <zhudi21@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarAichun Li <liaichun@huawei.com>
Signed-off-by: default avatarAichun Li <liaichun@huawei.com>
Reviewed-by: default avatarYue Haibing <yuehaibing@huawei.com>
Reviewed-by: default avatarwuchangye <wuchangye@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 130aeca0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment