bonding: fix enslaving a dev without mtu setting support
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest2 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bonding: populate essential new_slave->bond/dev earlydrivers/ | +2 | 1 reply | |
| 2/2 | bonding: remove NULL verification from bond_get_bond_by_slave()drivers/ | +0 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Ding Tianhong |
|---|---|
| 1/2 | A-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH net-next 0/2] bonding: fix enslaving a dev without mtu setting support
Hi,
With the introduction of bond_free_slave() we need to have slave->bond populated before calling it, however if the dev_mtu_set(slave, mtu) fails, we call bond_free_slave() before actually setting slave->bond, and thus we'll panic.
Fix this by populating slave->bond (and ->dev, it seems appropriate) as early as possible.
Also, remove a harmful check for NULL in bond_get_bond_by_slave(), as it's only hiding the real problem and making it harder to debug.
CC Jay Vosburgh <[email protected]>
CC Andy Gospodarek <[email protected]>
Signed-off-by Veaceslav Falico <[email protected]>
--- drivers/net/bonding/bond_main.c | 4 ++-- drivers/net/bonding/bonding.h | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)